mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
21 lines
472 B
TypeScript
21 lines
472 B
TypeScript
import "@testing-library/jest-dom";
|
|
import "@testing-library/jest-dom/extend-expect";
|
|
import { TextEncoder, TextDecoder } from "util";
|
|
|
|
global.TextEncoder = TextEncoder;
|
|
// @ts-ignore
|
|
global.TextDecoder = TextDecoder;
|
|
|
|
window.matchMedia = jest.fn().mockImplementation((query) => {
|
|
return {
|
|
matches: false,
|
|
media: query,
|
|
onchange: null,
|
|
addListener: jest.fn(),
|
|
removeListener: jest.fn(),
|
|
};
|
|
});
|
|
|
|
window.scroll = jest.fn();
|
|
window.alert = jest.fn();
|