By David Fekke
November 4th, 2019
None of my Jest based tests would run anymore. When I ran
npm test or
yarn test jest would start, but would never run any tests. It was like jest was just hanging or stuck, and not able to run any of the tests.
I tried reinstalling Node.js, downgrading Node. I even emptied the NPM cache and reinstalled jest. Nothing I did worked. I came across a Stackoverflow post. One of the tools Jest uses is called
The Stackover flow post suggested uninstalling and reinstalling
watchman. You can use Homebrew to do this on the Mac. If you are not familiar with Homebrew, it is essentially the missing package manager for macOS.
brew uninstall watchman brew install watchman
After I made this change, I reinstalled jest onto my computer, and now all of my tests run like they did before. I hope this helps with your set up as well.