Skip to content

Commit a9a8be2

Browse files
committed
Use testMatch
1 parent 6ce1629 commit a9a8be2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/react-scripts/utils/createJestConfig.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ module.exports = (resolve, rootDir, isEjecting) => {
2323
collectCoverageFrom: ['src/**/*.{js,jsx}'],
2424
setupFiles: [resolve('config/polyfills.js')],
2525
setupTestFrameworkScriptFile: setupTestsFile,
26-
testPathIgnorePatterns: [
27-
'<rootDir>[/\\\\](build|docs|node_modules|scripts)[/\\\\]'
26+
testMatch: [
27+
'<rootDir>/!(build|docs|node_modules|scripts)/**/__tests__/**/*.js?(x)',
28+
'<rootDir>/!(build|docs|node_modules|scripts)/**/?(*.)(spec|test).js?(x)'
2829
],
2930
testEnvironment: 'node',
3031
testURL: 'http://localhost',

0 commit comments

Comments
 (0)