-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjest.config.js
40 lines (40 loc) · 1020 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
module.exports = {
testEnvironment: 'jest-environment-jsdom',
transform: {
'.*\\.(tsx?)$': [
'@swc/jest',
{
jsc: {
target: 'es2021',
transform: {
react: {
runtime: 'automatic',
},
},
},
},
],
},
transformIgnorePatterns: [
// '/node_modules/',
'node_modules/(?!(react-helsinki-headless-cms|react-helsinki-headless-cms/apollo))/',
'^.+\\.module\\.(css|sass|scss)$',
],
moduleNameMapper: {
'.+\\.(css|styl|less|sass|scss)$': 'identity-obj-proxy',
},
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
testPathIgnorePatterns: [
'<rootDir>/.next/',
'<rootDir>/node_modules/',
'/__mocks__/',
],
coveragePathIgnorePatterns: [
'<rootDir>/src/generated/',
'<rootDir>/src/pages/',
'<rootDir>/src/domain/app/apollo/configureApollo.tsx',
'<rootDir>/src/utils/testUtils.ts',
],
collectCoverageFrom: ['src/**/*.{js,jsx,tsx}'],
testTimeout: 20000,
};