forked from freeCodeCamp/freeCodeCamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
25 lines (25 loc) · 829 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
module.exports = {
testPathIgnorePatterns: ['/node_modules/'],
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', './api-server'],
transformIgnorePatterns: ['node_modules/(?!(gatsby)/)'],
setupFilesAfterEnv: ['./jest.setup.js'],
testEnvironment: 'jsdom'
};