Tag: jest
-

Debugging React Unit Tests in a Monorepo with NX
After using NX for over a year, it’s frustrating that there is very sparse documentation on debugging with VSCode or using it with React. I finally decided to dig into setting up my debugging profile for our unit tests (because I was fed up with console.log – ing them). I found this YouTube video by…
-
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.
-
Testing with Jest in a node and ReactJS monorepo (and getting rid of environment.teardown error)
Big number of the applications we develop have at least one ReactJS UI, that is held in one repo and an API, held in another. If we need to reuse some part of the code, we do so by moving it to another repository and adding it as a git submodule For our latest project…