Skip to content

Commit fd3651e

Browse files
Another test
1 parent e444b81 commit fd3651e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/tests/getUserLocalesFromBrowserLanguages.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,17 @@ describe('locale-helpers', () => {
9797
);
9898
});
9999

100+
it('when short base not supported, picks first variant of same base (customer order respected)', () => {
101+
const supported: LocaleValue[] = [
102+
LOCALE_KEY.ArAe,
103+
LOCALE_KEY.FrFr,
104+
LOCALE_KEY.EnUs,
105+
];
106+
expect(resolveSupportedLocaleForBrowserTag('ar', supported)).to.equal(
107+
LOCALE_KEY.ArAe,
108+
);
109+
});
110+
100111
it('returns undefined if no base or variant is supported', () => {
101112
const supported: LocaleValue[] = [LOCALE_KEY.FrFr, LOCALE_KEY.EnUs];
102113
expect(resolveSupportedLocaleForBrowserTag('ar-OM', supported)).to.equal(

0 commit comments

Comments
 (0)