Skip to content

Commit

Permalink
Revert to modulePathIgnorePatterns to fix issue with watchers crashin…
Browse files Browse the repository at this point in the history
…g jest
  • Loading branch information
ro-savage committed May 28, 2017
1 parent 3f34238 commit 5bc5076
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/react-scripts/scripts/utils/createJestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ module.exports = (resolve, rootDir, isEjecting) => {
collectCoverageFrom: ['src/**/*.{js,jsx}'],
setupFiles: [resolve('config/polyfills.js')],
setupTestFrameworkScriptFile: setupTestsFile,
testMatch: [
'<rootDir>/src/**/__tests__/**/*.js?(x)',
'<rootDir>/src/**/?(*.)(spec|test).js?(x)',
],
// the `testMatches` option currently watches node_modules
// Which causes crashes on large projects on MacOS.
// Once this is fixes we can change from `modulePathIgnorePatterns` to `testMatches`.
// See facebook/jest/issues/1767 & facebookincubator/create-react-app/pull/2395
modulePathIgnorePatterns: ['<rootDir>\/(?!src).*\/.*'],
testEnvironment: 'node',
testURL: 'http://localhost',
transform: {
Expand Down

0 comments on commit 5bc5076

Please sign in to comment.