2 setupFilesAfterEnv: ['./jest.setup.js'],
3 moduleDirectories: ['<rootDir>/node_modules', 'node_modules'],
6 'src/**/*.{js,jsx,ts,tsx}',
8 // Those two files have import.meta.url which is not handled during coverage parsing
9 '!src/app/store/_uploads/initUploadFileWorker.ts',
10 '!src/app/store/_downloads/fileSaver/download.ts',
12 testEnvironment: '@proton/jest-env',
13 resolver: './jest.resolver.js',
14 transformIgnorePatterns: [
15 'node_modules/(?!(@proton/shared|@proton/components|@protontech/mutex-browser|pmcrypto|pmcrypto-v6-canary|openpgp|@openpgp/web-stream-tools|@openpgp/asmcrypto.js|@openpgp/noble-hashes|jsmimeparser|@protontech/bip39|emoji-mart)/|client-zip)',
18 '^.+\\.(m?js|tsx?)$': '<rootDir>/jest.transform.js',
21 '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm)$': '@proton/components/__mocks__/fileMock.js',
22 '\\.(css|scss|less)$': '@proton/components/__mocks__/styleMock.js',
23 '\\.(md)$': '<rootDir>/src/__mocks__/mdMock.ts',
25 coverageReporters: ['text-summary', 'json'],
26 reporters: ['default', ['jest-junit', { suiteNameTemplate: '{filepath}', outputName: 'test-report.xml' }]],