refactor: theme manager (#17976)

This commit is contained in:
Jason Rasmussen 2025-04-29 17:44:09 -04:00 committed by GitHub
parent 2c2dd01bf0
commit 038a82c4f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 197 additions and 85 deletions

View file

@ -4,3 +4,15 @@ import { init } from 'svelte-i18n';
beforeAll(async () => {
await init({ fallbackLocale: 'dev' });
});
Object.defineProperty(globalThis, 'matchMedia', {
writable: true,
value: vi.fn().mockImplementation((query) => ({
matches: false,
media: query,
onchange: null,
addEventListener: vi.fn(),
removeEventListener: vi.fn(),
dispatchEvent: vi.fn(),
})),
});