2022-07-12 10:55:28 +02:00
|
|
|
import { vi } from "vitest";
|
|
|
|
|
2022-08-26 16:08:58 +02:00
|
|
|
vi.stubGlobal("matchMedia", (query: string) => ({
|
2022-07-12 10:55:28 +02:00
|
|
|
matches: false,
|
|
|
|
media: query,
|
|
|
|
onchange: null,
|
|
|
|
addListener: vi.fn(), // deprecated
|
|
|
|
removeListener: vi.fn(), // deprecated
|
|
|
|
addEventListener: vi.fn(),
|
|
|
|
removeEventListener: vi.fn(),
|
|
|
|
dispatchEvent: vi.fn(),
|
|
|
|
}));
|