From b73b1efb3eb515c5e081a3020d47dc122a1d31b0 Mon Sep 17 00:00:00 2001 From: Jeremy Morrell Date: Mon, 8 May 2017 16:05:49 +0200 Subject: [PATCH] Ignore the yarn cache directory (#2063) --- .../react-scripts/scripts/utils/createJestConfig.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/react-scripts/scripts/utils/createJestConfig.js b/packages/react-scripts/scripts/utils/createJestConfig.js index 5ba7fd16cb2..28382b0f78f 100644 --- a/packages/react-scripts/scripts/utils/createJestConfig.js +++ b/packages/react-scripts/scripts/utils/createJestConfig.js @@ -26,7 +26,18 @@ module.exports = (resolve, rootDir, isEjecting) => { setupFiles: [resolve('config/polyfills.js')], setupTestFrameworkScriptFile: setupTestsFile, testPathIgnorePatterns: [ - '[/\\\\](build|docs|node_modules|scripts)[/\\\\]', + // 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|\\.cache|docs|node_modules|scripts)[/\\\\]', ], testEnvironment: 'node', testURL: 'http://localhost',