Skip to content

Commit 7528a82

Browse files
committed
Only run tests in <rootDir>/src (facebook#544)
* updates Jest to 19.0.2 * removes testPathIgnorePatterns from jest config * adds testMatch to jest config to only match files in src
1 parent 052fcdd commit 7528a82

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: packages/react-scripts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"fs-extra": "0.30.0",
5050
"html-webpack-plugin": "2.28.0",
5151
"http-proxy-middleware": "0.17.3",
52-
"jest": "18.1.0",
52+
"jest": "19.0.2",
5353
"object-assign": "4.1.1",
5454
"postcss-loader": "1.3.3",
5555
"promise": "7.1.1",

Diff for: packages/react-scripts/scripts/utils/createJestConfig.js

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

0 commit comments

Comments
 (0)