mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 02:44:55 +00:00
Add new test to check for duplicate iso locales
This commit is contained in:
parent
be8bcaa8e7
commit
073b79e76b
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const { getInitLocale } = require('..');
|
||||
const { getInitLocale, isoLocales } = require('..');
|
||||
|
||||
describe('I18N default locale', () => {
|
||||
describe('getInitLocale', () => {
|
||||
@ -23,5 +23,10 @@ describe('I18N default locale', () => {
|
||||
process.env.STRAPI_PLUGIN_I18N_INIT_LOCALE_CODE = 'zzzzz';
|
||||
expect(() => getInitLocale()).toThrow();
|
||||
});
|
||||
|
||||
test('Checks if there are any duplicate locales present in the "iso-locales.json" file', () => {
|
||||
const set = new Set(isoLocales.map((item) => item.code)).size !== isoLocales.length;
|
||||
expect(set).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user