forked from freeCodeCamp/freeCodeCamp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
33 lines (33 loc) · 998 Bytes
/
jest.config.js
File metadata and controls
33 lines (33 loc) · 998 Bytes
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
module.exports = {
testPathIgnorePatterns: [
'/node_modules/',
'api/',
'e2e/',
'tools/challenge-helper-scripts/',
'tools/scripts/build/',
'curriculum'
],
moduleNameMapper: {
'\\.(jpg|jpeg|png|svg|woff|woff2)$':
'<rootDir>/client/src/__mocks__/file-mock.ts',
// Plain CSS - match css files that don't end with
// '.module.css' https://regex101.com/r/VzwrKH/4
'^(?!.*\\.module\\.css$).*\\.css$':
'<rootDir>/client/src/__mocks__/style-mock.ts',
// CSS Modules - match files that end with 'module.css'
'\\.module\\.css$': 'identity-obj-proxy',
'^lodash-es$': 'lodash'
},
globals: {
__PATH_PREFIX__: ''
},
verbose: true,
transform: {
'^.+\\.[jt]sx?$': '<rootDir>/jest.transform.js'
},
roots: ['.', './client'],
transformIgnorePatterns: ['node_modules/.pnpm/(?!(nanoid|uuid)@)'],
setupFilesAfterEnv: ['./jest.setup.js'],
testEnvironment: 'jsdom',
watchPathIgnorePatterns: ['<rootDir>/__fixtures__.*']
};