shlink-web-client/config/jest/setupTests.ts

12 lines
411 B
TypeScript
Raw Normal View History

import '@testing-library/jest-dom';
2022-04-30 13:01:50 +03:00
import 'jest-canvas-mock';
import ResizeObserver from 'resize-observer-polyfill';
2022-11-12 19:51:37 +03:00
import { setAutoFreeze } from 'immer';
2022-04-30 13:01:50 +03:00
(global as any).ResizeObserver = ResizeObserver;
(global as any).scrollTo = () => {};
(global as any).prompt = () => {};
(global as any).matchMedia = (media: string) => ({ matches: false, media });
2022-11-12 19:51:37 +03:00
setAutoFreeze(false); // TODO Bypassing a bug on jest