Fix mock test env check outside of browser

This commit is contained in:
Jamie Kyle 2024-04-16 13:13:02 -07:00 committed by GitHub
parent dbff1ab4d1
commit 3f074a7737
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 47 additions and 22 deletions

View file

@ -12,7 +12,7 @@ const { HourCyclePreference } = require('../ts/types/I18N');
chai.use(chaiAsPromised);
setEnvironment(Environment.Test);
setEnvironment(Environment.Test, true);
const storageMap = new Map();
@ -32,7 +32,6 @@ global.window = {
getHourCyclePreference: () => HourCyclePreference.UnknownPreference,
getPreferredSystemLocales: () => ['en'],
getLocaleOverride: () => null,
isTestOrMockEnvironment: () => true,
},
i18n: key => `i18n(${key})`,
storage: {