twenty / packages /twenty-shared /src /utils /validation /__tests__ /isValidLocale.test.ts
Jules
Initial clean CRM deployment with prebuilt assets
d9494a5
Raw
History Blame Contribute Delete
480 Bytes
import { APP_LOCALES } from '@/translations';
import { isValidLocale } from '@/utils/validation/isValidLocale';
describe('isValidLocale', () => {
it('should return true for valid locales', () => {
Object.keys(APP_LOCALES).forEach((locale) => {
expect(isValidLocale(locale)).toBe(true);
});
});
it('should return false for invalid locales', () => {
expect(isValidLocale('invalidLocale')).toBe(false);
expect(isValidLocale(null)).toBe(false);
});
});