Replace path with filename in Jest config
This commit is contained in:
parent
af42c16982
commit
5bd4bcc3e3
1 changed files with 1 additions and 1 deletions
|
@ -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
|
// workaround for eslint-import-resolver-jest only resolving in test files
|
||||||
// see https://github.com/JoinColony/eslint-import-resolver-jest#note
|
// 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) {
|
if (isESLint) {
|
||||||
testMatch = testMatch.map(path => path.replace('_spec.js', ''));
|
testMatch = testMatch.map(path => path.replace('_spec.js', ''));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue