Skip to content

Commit

Permalink
Only run tests in <rootDir>/src (facebook#544)
Browse files Browse the repository at this point in the history
* updates Jest to 19.0.2

* removes testPathIgnorePatterns from jest config

* adds testMatch to jest config to only match files in src
  • Loading branch information
kindrowboat committed Mar 13, 2017
1 parent 052fcdd commit 7528a82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"fs-extra": "0.30.0",
"html-webpack-plugin": "2.28.0",
"http-proxy-middleware": "0.17.3",
"jest": "18.1.0",
"jest": "19.0.2",
"object-assign": "4.1.1",
"postcss-loader": "1.3.3",
"promise": "7.1.1",
Expand Down
5 changes: 3 additions & 2 deletions packages/react-scripts/scripts/utils/createJestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ module.exports = (resolve, rootDir, isEjecting) => {
collectCoverageFrom: ['src/**/*.{js,jsx}'],
setupFiles: [resolve('config/polyfills.js')],
setupTestFrameworkScriptFile: setupTestsFile,
testPathIgnorePatterns: [
'<rootDir>[/\\\\](build|docs|node_modules|scripts)[/\\\\]',
testMatch: [
'<rootDir>/src/**/__tests__/**/*.js?(x)',
'<rootDir>/src/**/?(*.)(spec|test).js?(x)'
],
testEnvironment: 'node',
testURL: 'http://localhost',
Expand Down

0 comments on commit 7528a82

Please sign in to comment.