refactor: simplify jest config (#42136)
* refactor: bring api jest tests to root * refactor: pull client tests to root * fix: remove ancient curriculum babelrc * feat: run all jest tests at once * fix: remove unused babelrcRoot * chore: remove more jests
This commit is contained in:
committed by
GitHub
parent
8ba3b8c16c
commit
1c1d86922c
@ -1,5 +1,26 @@
|
||||
// TODO: remove this once /tools/dashboard's tests are configured correctly
|
||||
|
||||
module.exports = {
|
||||
testPathIgnorePatterns: ['/node_modules/', '/tools/dashboard']
|
||||
// TODO: remove /tools/dashboard when the tests are configured correctly
|
||||
testPathIgnorePatterns: ['/node_modules/', '/tools/dashboard'],
|
||||
moduleNameMapper: {
|
||||
'\\.(jpg|jpeg|png|svg|woff|woff2)$':
|
||||
'<rootDir>/client/src/__mocks__/fileMock.js',
|
||||
// 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__/styleMock.js',
|
||||
// CSS Modules - match files that end with 'module.css'
|
||||
'\\.module\\.css$': 'identity-obj-proxy',
|
||||
'react-i18next': '<rootDir>/client/src/__mocks__/react-i18nextMock.js',
|
||||
'^lodash-es$': 'lodash'
|
||||
},
|
||||
globals: {
|
||||
__PATH_PREFIX__: ''
|
||||
},
|
||||
verbose: true,
|
||||
transform: {
|
||||
'^.+\\.js$': '<rootDir>/jest.transform.js'
|
||||
},
|
||||
roots: ['.', './client', './api-server'],
|
||||
transformIgnorePatterns: ['node_modules/(?!(gatsby)/)'],
|
||||
setupFilesAfterEnv: ['./jest.setup.js']
|
||||
};
|
||||
|
Reference in New Issue
Block a user