Getting an error while trying to debug JEST tests

Do you get something like:
“Error: Cannot find module ‘D:\project_folder\package.json'”
And your require stack contains paths.js, env.js and test.js?


Well, you have to both configure the runtimeExecutable and the cwd. This error is because you’re running the tests from outside your directory.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.