Merge branch 'fix-types' into 'main'
[ProtonMail-WebClient.git] / applications / calendar / jest.config.js
blobb58dcebaa369d6870c2599c4d46fa1e0d709e0af
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|@protontech/interval-tree|pmcrypto|pmcrypto-v6-canary|openpgp|@openpgp/web-stream-tools|@openpgp/asmcrypto.js|@openpgp/noble-hashes|@protontech/bip39|jsmimeparser|emoji-mart|msw|@mswjs)/)',
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' }]],