Merge branch 'fix-types' into 'main'
[ProtonMail-WebClient.git] / applications / docs-editor / jest.config.js
blobfdb64b40ec8fc9597cbebdf0d73b77be94d102af
1 module.exports = {
2   setupFilesAfterEnv: ['./jest.setup.js'],
3   moduleDirectories: ['<rootDir>/node_modules', 'node_modules'],
4   collectCoverage: false,
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' }]],