i18n: Upgrade translations from crowdin (253f51dd). (pass-extension)
[ProtonMail-WebClient.git] / applications / verify / jest.setup.js
blob7fdca57ac0e908855756e91ad321d3aec96760bc
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;
21 result.call = call;
22 result.stop = stop;
23 result.start = start;
25 return result;
26 });
28 global.MutationObserver = class {
29 disconnect() {} // eslint-disable-line
30 observe() {} // eslint-disable-line
33 jest.mock('@proton/shared/lib/i18n/dateFnLocales', () => ({
34 __esModule: true,
35 }));
37 jest.mock('@proton/shared/lib/pow/wasmWorkerWrapper.ts', () => ({
38 __esModule: true,
39 }));
41 jest.mock('@proton/shared/lib/pow/pbkdfWorkerWrapper.ts', () => ({
42 __esModule: true,
43 }));