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 Timer committed May 16, 2017
1 parent c7fca1c commit 7694c45
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions 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 7694c45

Please sign in to comment.