Files
grafana/public/app/core/internationalization/constants.test.ts
Josh Hunt fc75076b72 I18n: Show languages in local names (#57367)
* I18n: Show languages in local names

* fixed test
2022-10-21 05:29:03 -04:00

15 lines
453 B
TypeScript

import { uniqBy } from 'lodash';
import { LOCALES, VALID_LOCALES } from './constants';
describe('internationalization constants', () => {
it('should not have duplicate languages codes', () => {
const uniqLocales = uniqBy(LOCALES, (v) => v.code);
expect(LOCALES).toHaveLength(uniqLocales.length);
});
it('should have a correct list of valid locale codes', () => {
expect(VALID_LOCALES).toEqual(LOCALES.map((v) => v.code));
});
});