Merge branch 'renovate/playwright' into 'main'
[ProtonMail-WebClient.git] / packages / docs-core / jest.config.js
blob1f5a88662a08196fd66715179cc941b57a9f44e5
1 module.exports = {
2   setupFilesAfterEnv: ['./jest.setup.js'],
3   moduleDirectories: ['<rootDir>/node_modules', 'node_modules'],
4   collectCoverage: true,
5   collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}', '!src/app/locales.ts'],
6   testEnvironment: '@proton/jest-env',
7   resolver: './jest.resolver.js',
8   transformIgnorePatterns: [
9     '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)',
10   ],
11   transform: {
12     '^.+\\.(m?js|tsx?)$': '<rootDir>/jest.transform.js',
13   },
14   moduleNameMapper: {
15     '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm)$': '@proton/components/__mocks__/fileMock.js',
16     '\\.(css|scss|less)$': '@proton/components/__mocks__/styleMock.js',
17     '\\.(md)$': '<rootDir>/src/__mocks__/mdMock.ts',
18   },
19   coverageReporters: ['text-summary', 'json'],
20   reporters: ['default', ['jest-junit', { suiteNameTemplate: '{filepath}', outputName: 'test-report.xml' }]],