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',