Replace path with filename in Jest config
This commit is contained in:
parent
af42c16982
commit
5bd4bcc3e3
|
@ -19,7 +19,7 @@ let testMatch = ['<rootDir>/spec/frontend/**/*_spec.js', '<rootDir>/ee/spec/fron
|
|||
|
||||
// workaround for eslint-import-resolver-jest only resolving in test files
|
||||
// see https://github.com/JoinColony/eslint-import-resolver-jest#note
|
||||
const isESLint = module.parent.path.includes('/eslint-import-resolver-jest/');
|
||||
const isESLint = module.parent.filename.includes('/eslint-import-resolver-jest/');
|
||||
if (isESLint) {
|
||||
testMatch = testMatch.map(path => path.replace('_spec.js', ''));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue