mirror of
https://github.com/immich-app/immich.git
synced 2026-01-17 01:21:02 -05:00
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
28 lines
652 B
TypeScript
28 lines
652 B
TypeScript
import '@testing-library/jest-dom';
|
|
import { init } from 'svelte-i18n';
|
|
|
|
beforeAll(async () => {
|
|
await init({ fallbackLocale: 'dev' });
|
|
Element.prototype.animate = vi.fn().mockImplementation(() => ({ cancel: () => {}, finished: Promise.resolve() }));
|
|
});
|
|
|
|
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(),
|
|
})),
|
|
});
|
|
|
|
vi.mock('$env/dynamic/public', () => {
|
|
return {
|
|
env: {
|
|
PUBLIC_IMMICH_HOSTNAME: '',
|
|
},
|
|
};
|
|
});
|