Skip to content

Commit

Permalink
Ignore node_modules folders from jest's watch
Browse files Browse the repository at this point in the history
Running `npx jest --watch` threw EMFILE errors in the console, for which [ignoring `node_modules` is a workaround](jest-community/vscode-jest#76 (comment)).
  • Loading branch information
romaricpascal committed Aug 2, 2024
1 parent d24941b commit 8cf92a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jest.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ export default {
testMatch: ['**/*.test.{js,mjs}'],
transform: { '^.+\\.m?js$': ['babel-jest'] },

// Ignore built fixtures during `--watch`
watchPathIgnorePatterns: ['fixtures/build']
// Ignore built fixtures during `--watch` and node_modules folders
watchPathIgnorePatterns: ['fixtures/build', '/node_modules/']
}

0 comments on commit 8cf92a0

Please sign in to comment.