mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-04 16:02:08 +00:00
30 lines
610 B
TypeScript
30 lines
610 B
TypeScript
|
|
import "@testing-library/jest-dom/vitest";
|
||
|
|
import { cleanup } from "@testing-library/react";
|
||
|
|
import { afterEach } from "vitest";
|
||
|
|
|
||
|
|
afterEach(() => {
|
||
|
|
cleanup();
|
||
|
|
});
|
||
|
|
|
||
|
|
Object.defineProperty(window, "matchMedia", {
|
||
|
|
writable: true,
|
||
|
|
value: (query: string) => ({
|
||
|
|
matches: false,
|
||
|
|
media: query,
|
||
|
|
onchange: null,
|
||
|
|
addListener: () => {},
|
||
|
|
removeListener: () => {},
|
||
|
|
addEventListener: () => {},
|
||
|
|
removeEventListener: () => {},
|
||
|
|
dispatchEvent: () => false,
|
||
|
|
}),
|
||
|
|
});
|
||
|
|
|
||
|
|
class ResizeObserverMock {
|
||
|
|
observe() {}
|
||
|
|
unobserve() {}
|
||
|
|
disconnect() {}
|
||
|
|
}
|
||
|
|
|
||
|
|
window.ResizeObserver = ResizeObserverMock;
|