Skip to content

Commit 94149c7

Browse files
jmorrellgaearon
authored andcommitted
Ignore the yarn cache directory (#2063)
1 parent 5a7d8e8 commit 94149c7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

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

+12-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,18 @@ module.exports = (resolve, rootDir, isEjecting) => {
2626
setupFiles: [resolve('config/polyfills.js')],
2727
setupTestFrameworkScriptFile: setupTestsFile,
2828
testPathIgnorePatterns: [
29-
'<rootDir>[/\\\\](build|docs|node_modules|scripts)[/\\\\]',
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|\\.cache|docs|node_modules|scripts)[/\\\\]',
3041
],
3142
testEnvironment: 'node',
3243
testURL: 'http://localhost',

0 commit comments

Comments
 (0)