Created by: ro-savage
Fixes #2393 (closed)
This PR fixes an ongoing issue with large node_modules folders and create-react-app tests.
The underlining issue is with Jest and how it watches files, and the current method that is used for testMatches means that files in node_modules are watched and crashes jest.
@thisconnect created issue #2393 (closed) that shows how to reproduce the error and included an example repo.
This PR uses modulePathIgnorePatterns to decide what to watch/not-watch instead of testMatches and correctly ignores node_modules. As seen in Jest issue facebook/jest/issues/1767