We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ce188e commit 5b18ef4Copy full SHA for 5b18ef4
src/index.js
@@ -49,10 +49,13 @@ const getConfigFunction = config => () => {
49
return resolveConfig([defaultConfig])
50
}
51
52
- if (!_.isObject(config)) {
53
- getModuleDependencies(config).forEach(mdl => {
54
- delete require.cache[require.resolve(mdl.file)]
55
- })
+ // Skip this if Jest is running: https://github.com/facebook/jest/pull/9841#issuecomment-621417584
+ if (process.env.JEST_WORKER_ID === undefined) {
+ if (!_.isObject(config)) {
+ getModuleDependencies(config).forEach(mdl => {
56
+ delete require.cache[require.resolve(mdl.file)]
57
+ })
58
+ }
59
60
61
const configObject = _.isObject(config) ? _.get(config, 'config', config) : require(config)
0 commit comments