48935e2168
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
13 lines
303 B
TypeScript
13 lines
303 B
TypeScript
import { vi } from "vitest";
|
|
|
|
vi.stubGlobal("matchMedia", (query: string) => ({
|
|
matches: false,
|
|
media: query,
|
|
onchange: null,
|
|
addListener: vi.fn(), // deprecated
|
|
removeListener: vi.fn(), // deprecated
|
|
addEventListener: vi.fn(),
|
|
removeEventListener: vi.fn(),
|
|
dispatchEvent: vi.fn(),
|
|
}));
|