Replace path with filename in Jest config

This commit is contained in:
Winnie Hellmann 2019-07-11 11:13:01 +00:00 committed by Kushal Pandya
parent af42c16982
commit 5bd4bcc3e3
1 changed files with 1 additions and 1 deletions

View File

@ -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', ''));
}