Skip to content

Commit c5e5eb5

Browse files
kindrowboatTimer
authored andcommitted
Only run tests in <rootDir>/src (facebook#544) (facebook#1808)
* 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
1 parent 9f8a001 commit c5e5eb5

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

packages/react-scripts/scripts/utils/createJestConfig.js

+2-13
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,8 @@ module.exports = (resolve, rootDir, isEjecting) => {
2626
setupFiles: [resolve('config/polyfills.js')],
2727
setupTestFrameworkScriptFile: setupTestsFile,
2828
testMatch: [
29-
// Ignore the following directories:
30-
// build
31-
// - the build output directory
32-
// .cache
33-
// - the yarn module cache on Ubuntu if $HOME === rootDir
34-
// docs
35-
// - often used to publish to Github Pages
36-
// node_modules
37-
// - ignore tests in dependencies
38-
// scripts
39-
// - directory generated upon eject
40-
'<rootDir>/!(build|docs|node_modules|scripts)/**/__tests__/**/*.js?(x)',
41-
'<rootDir>/!(build|docs|node_modules|scripts)/**/?(*.)(spec|test).js?(x)',
29+
'<rootDir>/src/**/__tests__/**/*.js?(x)',
30+
'<rootDir>/src/**/?(*.)(spec|test).js?(x)'
4231
],
4332
testEnvironment: 'node',
4433
testURL: 'http://localhost',

0 commit comments

Comments
 (0)