Loading panel/src/i18n/language.test.ts +8 −1 Changes for panel/src/i18n/language.test.ts: 8 added lines, 1 removed line. Original line number Diff line number Diff line // @vitest-environment jsdom import { describe, it, expect, vi, afterEach } from "vitest"; import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import i18next from "i18next"; import LanguageDetector from "i18next-browser-languagedetector"; import { i18nOptions } from "./index"; Loading @@ -15,6 +15,13 @@ async function boot(languages: string[]) { return instance; } // Importing ./index boots the app's own instance, which on some Node versions (22, // which CI runs) caches jsdom's en-US in storage before the first test; a first // visit starts from empty storage, and no test may inherit another's choice. beforeEach(() => { localStorage.clear(); }); afterEach(() => { vi.restoreAllMocks(); }); Loading Loading
panel/src/i18n/language.test.ts +8 −1 Changes for panel/src/i18n/language.test.ts: 8 added lines, 1 removed line. Original line number Diff line number Diff line // @vitest-environment jsdom import { describe, it, expect, vi, afterEach } from "vitest"; import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import i18next from "i18next"; import LanguageDetector from "i18next-browser-languagedetector"; import { i18nOptions } from "./index"; Loading @@ -15,6 +15,13 @@ async function boot(languages: string[]) { return instance; } // Importing ./index boots the app's own instance, which on some Node versions (22, // which CI runs) caches jsdom's en-US in storage before the first test; a first // visit starts from empty storage, and no test may inherit another's choice. beforeEach(() => { localStorage.clear(); }); afterEach(() => { vi.restoreAllMocks(); }); Loading