Skip to content

Commit

Permalink
Only run tests in <rootDir>/src (facebook#544) (facebook#1808)
Browse files Browse the repository at this point in the history
* 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

* Bump babel-jest to 19.0.0 to match jest 19.0.2
  • Loading branch information
kindrowboat authored and romaindso committed Jul 10, 2017
1 parent 736e5c5 commit ced3b2b
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions packages/react-scripts/scripts/utils/createJestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,8 @@ module.exports = (resolve, rootDir, isEjecting) => {
setupFiles: [resolve('config/polyfills.js')],
setupTestFrameworkScriptFile: setupTestsFile,
testMatch: [
// Ignore the following directories:
// build
// - the build output directory
// .cache
// - the yarn module cache on Ubuntu if $HOME === rootDir
// docs
// - often used to publish to Github Pages
// node_modules
// - ignore tests in dependencies
// scripts
// - directory generated upon eject
'<rootDir>/!(build|docs|node_modules|scripts)/**/__tests__/**/*.js?(x)',
'<rootDir>/!(build|docs|node_modules|scripts)/**/?(*.)(spec|test).js?(x)',
'<rootDir>/src/**/__tests__/**/*.js?(x)',
'<rootDir>/src/**/?(*.)(spec|test).js?(x)'
],
testEnvironment: 'node',
testURL: 'http://localhost',
Expand Down

0 comments on commit ced3b2b

Please sign in to comment.