import localeUtilsFactory from './LocaleUtils';
export const LOCALES_YEAR_UNFORMATTED = [
    'cs',
    'da',
    'de',
    'el',
    'en',
    'es',
    'fi',
    'fr',
    'he',
    'hi',
    'id',
    'it',
    'lt',
    'ms',
    'nl',
    'no',
    'pl',
    'pt',
    'ro',
    'ru',
    'sv',
    'tl',
    'tr',
    'uk',
    'vi',
];
const FORMATTED_YEAR_TEST_DATA = [
    {
        locale: 'ko',
        expectedYear: '2022년',
    },
    {
        locale: 'ja',
        expectedYear: '2022年',
    },
    {
        locale: 'ar',
        expectedYear: '2022',
    },
    {
        locale: 'bg',
        expectedYear: '2022 г.',
    },
    {
        locale: 'hu',
        expectedYear: '2022.',
    },
    {
        locale: 'th',
        expectedYear: 'พ.ศ. 2565',
    },
    {
        locale: 'zh',
        expectedYear: '2022年',
    },
];
const FORMATTED_WEEKDAY_SHORT_TEST_DATA = [
    {
        locale: 'ko',
        expectedWeekday: '월',
    },
    {
        locale: 'ko-kr',
        expectedWeekday: '월',
    },
    {
        locale: 'ar',
        expectedWeekday: 'ن',
    },
    {
        locale: 'ar-jo',
        expectedWeekday: 'ن',
    },
    {
        locale: 'he',
        expectedWeekday: 'ב׳',
    },
    {
        locale: 'he-il',
        expectedWeekday: 'ב׳',
    },
];
describe('LocaleUtils', () => {
    const year = new Date('2022-01-01T00:00:00Z');
    for (const testData of FORMATTED_YEAR_TEST_DATA) {
        it(`${testData.locale} locale`, () => {
            const localeUtils = localeUtilsFactory(testData.locale);
            const result = localeUtils.formatYear(year);
            expect(result).toBe(testData.expectedYear);
        });
    }
    it('should return unformatted year', () => {
        for (const locale of LOCALES_YEAR_UNFORMATTED) {
            const getLocaleUtilsFactory = () => localeUtilsFactory(locale);
            const localeUtils = getLocaleUtilsFactory();
            const result = localeUtils.formatYear(year);
            expect(result).toBe('2022');
        }
    });
    for (const testData of FORMATTED_WEEKDAY_SHORT_TEST_DATA) {
        it(`${testData.locale} locale should return formatted week days`, () => {
            const localeUtils = localeUtilsFactory(testData.locale);
            const result = localeUtils.formatWeekdayShort(1);
            expect(result).toBe(testData.expectedWeekday);
        });
    }
});
//# sourceMappingURL=LocaleUtils.spec.js.map