mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
i18n: Add test to check languages match a canonical locale (#93105)
add test to check languages match a canonical locale
This commit is contained in:
parent
2585c58dd4
commit
58907a8464
@ -25,6 +25,13 @@ describe('internationalization constants', () => {
|
||||
expect(DEFAULT_LANGUAGE).toBe(ENGLISH_US);
|
||||
});
|
||||
|
||||
it('should match a canonical locale definition', () => {
|
||||
for (const lang of LANGUAGES) {
|
||||
const resolved = Intl.getCanonicalLocales(lang.code);
|
||||
expect(lang.code).toEqual(resolved[0]);
|
||||
}
|
||||
});
|
||||
|
||||
it('should not have duplicate languages codes', () => {
|
||||
const uniqLocales = uniqBy(LANGUAGES, (v) => v.code);
|
||||
expect(LANGUAGES).toHaveLength(uniqLocales.length);
|
||||
|
Loading…
Reference in New Issue
Block a user