1 import '@testing-library/jest-dom';
4 import '@proton/testing/lib/mockMatchMedia';
5 import '@proton/testing/lib/mockUnleash';
7 import ResizeObserver from './src/tests/mock/ResizeObserver';
9 // Silence warnings on expect to throw https://github.com/testing-library/react-testing-library/issues/157
10 console.error = () => {};
11 console.warn = () => {};
14 window.ResizeObserver = ResizeObserver;
17 // Do not start crypto worker pool, let the single tests setup/mock the CryptoProxy as needed
18 jest.mock('@proton/shared/lib/helpers/setupCryptoWorker', () => ({
20 loadCryptoWorker: jest.fn(),
23 // Silence JDOM warnings triggered by emoji-mart
24 HTMLCanvasElement.prototype.getContext = jest.fn();
26 jest.mock('@proton/shared/lib/i18n/dateFnLocales', () => ({
30 jest.mock('@proton/shared/lib/pow/wasmWorkerWrapper.ts', () => ({
34 jest.mock('@proton/shared/lib/pow/pbkdfWorkerWrapper.ts', () => ({