Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / applications / drive / jest.config.js
blobf68bff179db145a3b51e6498840a444cb643933e
1 module.exports = {
2     setupFilesAfterEnv: ['./jest.setup.js'],
3     moduleDirectories: ['<rootDir>/node_modules', 'node_modules'],
4     collectCoverage: true,
5     collectCoverageFrom: [
6         'src/**/*.{js,jsx,ts,tsx}',
7         '!src/app/locales.ts',
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',
11     ],
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)',
16     ],
17     transform: {
18         '^.+\\.(m?js|tsx?)$': '<rootDir>/jest.transform.js',
19     },
20     moduleNameMapper: {
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',
24     },
25     coverageReporters: ['text-summary', 'json'],
26     reporters: ['default', ['jest-junit', { suiteNameTemplate: '{filepath}', outputName: 'test-report.xml' }]],