mirror of
https://github.com/immich-app/immich.git
synced 2026-02-09 03:08:53 +03:00
32 lines
710 B
TypeScript
32 lines
710 B
TypeScript
import '@testing-library/jest-dom';
|
|
import { init } from 'svelte-i18n';
|
|
|
|
beforeAll(async () => {
|
|
await init({ fallbackLocale: 'dev' });
|
|
Element.prototype.animate = vi.fn().mockImplementation(function () {
|
|
return { cancel: () => {}, finished: Promise.resolve() };
|
|
});
|
|
});
|
|
|
|
Object.defineProperty(globalThis, 'matchMedia', {
|
|
writable: true,
|
|
value: vi.fn().mockImplementation(function (query) {
|
|
return {
|
|
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: '',
|
|
},
|
|
};
|
|
});
|