-
Notifications
You must be signed in to change notification settings - Fork 150
/
Copy pathjest.config.js
27 lines (26 loc) · 869 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
const babelConfig = require('./babel.config');
module.exports = {
setupFilesAfterEnv: ['./tests/init.ts'],
moduleNameMapper: {
'\\.(css|scss|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|tgs)$':
'<rootDir>/tests/staticFileMock.js',
},
testPathIgnorePatterns: [
'<rootDir>/tests/playwright/',
'<rootDir>/node_modules/',
'<rootDir>/client/src/stylesheets/',
],
testEnvironment: 'jest-environment-jsdom',
transform: {
'\\.(jsx?|tsx?)$': ['babel-jest', {
...babelConfig,
plugins: [...babelConfig.plugins, 'babel-plugin-transform-import-meta'],
}],
'\\.txt$': 'jest-raw-loader',
},
transformIgnorePatterns: [
'/node_modules/(?!(axios|@capgo)/)',
],
// Fixes https://github.com/jestjs/jest/issues/11617 (expected to be fixed properly in Jest 30.0.0)
maxWorkers: 1,
};