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

13 lines
435 B
TypeScript
Raw Normal View History

import '@testing-library/jest-dom';
2022-04-30 13:01:50 +03:00
import 'jest-canvas-mock';
2022-12-26 00:44:43 +03:00
import 'chart.js/auto';
2022-04-30 13:01:50 +03:00
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