179db76b5a
I'm going to break up my MainMenu into smaller components, starting with the OverlayAvatar. Testing it taught me how to handle stores in Vitest. Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
13 lines
338 B
TypeScript
13 lines
338 B
TypeScript
Object.defineProperty(window, 'matchMedia', {
|
|
writable: true,
|
|
value: vi.fn().mockImplementation((query) => ({
|
|
matches: false,
|
|
media: query,
|
|
onchange: null,
|
|
addListener: vi.fn(), // deprecated
|
|
removeListener: vi.fn(), // deprecated
|
|
addEventListener: vi.fn(),
|
|
removeEventListener: vi.fn(),
|
|
dispatchEvent: vi.fn()
|
|
}))
|
|
});
|