1 import '@testing-library/jest-dom';
3 import '@proton/testing/lib/mockMatchMedia';
5 // Silence warnings on expect to throw https://github.com/testing-library/react-testing-library/issues/157
6 // console.error = () => {};
7 // console.warn = () => {};
9 // Globally mocked @proton/components modules
10 jest
.mock('@proton/components/hooks/useEventManager.ts', () => {
11 const subscribe
= jest
.fn();
12 const call
= jest
.fn();
13 const stop
= jest
.fn();
14 const start
= jest
.fn();
16 const result
= () => {
17 return { subscribe
, call
, stop
, start
};
20 result
.subscribe
= subscribe
;
28 global
.MutationObserver
= class {
29 disconnect() {} // eslint-disable-line
30 observe() {} // eslint-disable-line
33 jest
.mock('@proton/shared/lib/i18n/dateFnLocales', () => ({
37 jest
.mock('@proton/shared/lib/pow/wasmWorkerWrapper.ts', () => ({
41 jest
.mock('@proton/shared/lib/pow/pbkdfWorkerWrapper.ts', () => ({