From ae671dc9fe974b86748f7a90ec4985448ff371bb Mon Sep 17 00:00:00 2001 From: Igor Muchychka Date: Wed, 7 Aug 2019 05:42:57 +0200 Subject: [PATCH] Specify roots in Jest config (#7480) --- packages/react-scripts/scripts/utils/createJestConfig.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-scripts/scripts/utils/createJestConfig.js b/packages/react-scripts/scripts/utils/createJestConfig.js index 2ce0e5856f8..49d7e74788e 100644 --- a/packages/react-scripts/scripts/utils/createJestConfig.js +++ b/packages/react-scripts/scripts/utils/createJestConfig.js @@ -23,6 +23,8 @@ module.exports = (resolve, rootDir, isEjecting) => { : undefined; const config = { + roots: ['/src'], + collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}', '!src/**/*.d.ts'], setupFiles: [