Merge branch 'VPNBE-988-create-gateway-bugfix' into 'main'
[ProtonMail-WebClient.git] / applications / pass-extension / jest.config.js
blob026e808835a5a853eb259424feaea088c16916e1
1 module.exports = {
2     collectCoverage: true,
3     setupFilesAfterEnv: ['./jest.setup.js'],
4     moduleDirectories: ['<rootDir>/node_modules', 'node_modules'],
5     testEnvironment: '@proton/jest-env',
6     transformIgnorePatterns: [
7         'node_modules/(?!(@proton/shared|@proton/components|pmcrypto|pmcrypto-v6-canary|openpgp|@openpgp/web-stream-tools|otpauth)/)',
8     ],
9     transform: { '^.+\\.(m?js|tsx?)$': 'babel-jest' },
10     coverageReporters: ['text-summary', 'json'],
11     reporters: ['default', ['jest-junit', { suiteNameTemplate: '{filepath}', outputName: 'test-report.xml' }]],
12     testTimeout: 30000,
13     moduleNameMapper: {
14         'proton-pass-extension/(.*)$': ['<rootDir>/src/__mocks__/$1', '<rootDir>/src/$1'],
15         '\\.(css|scss|less)$': '@proton/components/__mocks__/styleMock.js',
16     },
17     globals: {
18         BUILD_TARGET: 'test',
19         ENV: 'test',
20         EXTENSION_BUILD: true,
21         DESKTOP_BUILD: false,
22     },