chore(docs): adjust settings copy
[ProtonMail-WebClient.git] / applications / mail / jest.config.js
blobeb2bb1afb37f738619c5e8cd688e4037cc9fdf7a
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         '!<rootDir>/src/app/locales.ts',
8         '!<rootDir>/src/service-worker.js',
9         '!<rootDir>/src/app/*.{js,jsx,ts,tsx}',
10         '!<rootDir>src/app/components/layout/*.{js,jsx,ts,tsx}',
11         '!<rootDir>/src/app/helpers/encryptedSearch/*.{js,jsx,ts,tsx}',
12         '!<rootDir>/src/app/containers/eo/*.{js,jsx,ts,tsx}',
13         '!<rootDir>/src/app/containers/eo/layout/*.{js,jsx,ts,tsx}',
14     ],
15     testEnvironment: '@proton/jest-env',
16     resolver: './jest.resolver.js',
17     transformIgnorePatterns: [
18         'node_modules/(?!(@proton/shared|@proton/components|@protontech/mutex-browser|pmcrypto|pmcrypto-v6-canary|openpgp|@openpgp/web-stream-tools|@openpgp/asmcrypto.js|@openpgp/noble-hashes|@protontech/bip39|jsmimeparser|emoji-mart|msw|@mswjs)/)',
19     ],
20     transform: {
21         '^.+\\.(m?js|tsx?)$': '<rootDir>/jest.transform.js',
22     },
23     moduleNameMapper: {
24         '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm)$': '@proton/components/__mocks__/fileMock.js',
25         '\\.(css|scss|less)$': '@proton/components/__mocks__/styleMock.js',
26         '\\.(md)$': '<rootDir>/src/__mocks__/mdMock.ts',
27         'proton-mail/(.*)$': '<rootDir>/src/app/$1',
28     },
29     coverageReporters: ['text-summary', 'json'],
30     reporters: ['default', ['jest-junit', { suiteNameTemplate: '{filepath}', outputName: 'test-report.xml' }]],