Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / packages / docs-shared / jest.config.js
blob0a375f5e351971eb7cbce9828fd7aae82d020b16
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|openpgp|@openpgp/web-stream-tools|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' }]],