diff --git a/src/locales/config.test.ts b/src/locales/config.test.ts new file mode 100644 index 00000000..f03db03f --- /dev/null +++ b/src/locales/config.test.ts @@ -0,0 +1,38 @@ +import type { RegionCode } from './types'; + +describe('RegionCode uniqueness', () => { + it('should have no duplicate region codes', () => { + const codes: RegionCode[] = [ + 'US', + 'GB', + 'CA', + 'AU', + 'ES', + 'MX', + 'AR', + 'CO', + 'FR', + 'BE', + 'CH', + 'DE', + 'AT', + 'LI', + 'SA', + 'AE', + 'EG', + 'IL', + 'JP', + 'CN', + 'TW', + 'HK', + 'BR', + 'PT', + 'RU', + 'IT', + 'KR', + ]; + + const unique = new Set(codes); + expect(unique.size).toBe(codes.length); + }); +}); diff --git a/src/locales/types.ts b/src/locales/types.ts index fc27a8ee..0f687067 100644 --- a/src/locales/types.ts +++ b/src/locales/types.ts @@ -27,10 +27,10 @@ export type RegionCode = | 'CO' // Spanish regions | 'FR' | 'BE' - | 'CH' // French regions + | 'CH' // French/German regions (Switzerland) | 'DE' | 'AT' - | 'CH' // German regions + | 'LI' // German regions (Liechtenstein) | 'SA' | 'AE' | 'EG' // Arabic regions