I\'m doing some slightly bizarre stuff using Jest for testing where I\'m writing some stuff to disk. If I use the watch flag in Jest however then I\'m finding (quit
I had the same problem when I had a directory that must not be tested, although I still wanted it to be inside of the __tests__ directory (e.g., __mocks__).
You should not use a use relative paths in such case (no slashes). So inside of your package.json file add:
jest: {
"modulePathIgnorePatterns": ["__mocks__"]
}
That solved my problem.