From c5e5eb5e33ddf7b18f701a39e190cfd37c528bde Mon Sep 17 00:00:00 2001 From: Tom Dunlap Date: Mon, 15 May 2017 17:46:18 -0700 Subject: [PATCH] Only run tests in /src (#544) (#1808) * Only run tests in /src (#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 --- .../scripts/utils/createJestConfig.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/react-scripts/scripts/utils/createJestConfig.js b/packages/react-scripts/scripts/utils/createJestConfig.js index e41334b3bc8..db5d3566e29 100644 --- a/packages/react-scripts/scripts/utils/createJestConfig.js +++ b/packages/react-scripts/scripts/utils/createJestConfig.js @@ -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 - '/!(build|docs|node_modules|scripts)/**/__tests__/**/*.js?(x)', - '/!(build|docs|node_modules|scripts)/**/?(*.)(spec|test).js?(x)', + '/src/**/__tests__/**/*.js?(x)', + '/src/**/?(*.)(spec|test).js?(x)' ], testEnvironment: 'node', testURL: 'http://localhost',