mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 01:23:32 -06:00
* backend locale -> language * frontend locale -> language * sample.ini and tests * fix few last locale -> language * fix few last locale -> language
15 lines
465 B
TypeScript
15 lines
465 B
TypeScript
import { uniqBy } from 'lodash';
|
|
|
|
import { LANGUAGES, VALID_LANGUAGES } from './constants';
|
|
|
|
describe('internationalization constants', () => {
|
|
it('should not have duplicate languages codes', () => {
|
|
const uniqLocales = uniqBy(LANGUAGES, (v) => v.code);
|
|
expect(LANGUAGES).toHaveLength(uniqLocales.length);
|
|
});
|
|
|
|
it('should have a correct list of valid locale codes', () => {
|
|
expect(VALID_LANGUAGES).toEqual(LANGUAGES.map((v) => v.code));
|
|
});
|
|
});
|