React + Jest Testing on Windows II

October 28, 2014

Last time I wrote about running Jest on Windows there was one thing I left out. The test output would show if the tests pass or fail but no data is displayed regarding why they fail. This is due to an issue with stdio in Windows, however, there appears to be a fix in the works.

Until that fix makes its way into a released version of Jest, you can simply copy bin/jest.js from Connor Malone’s branch on GitHub as a workaround. If using the file outright doesn’t sound desirable, any line that has process.exit(0) can be wrapped in a process.on('exit') block:

process.on('exit', function(){

See the diff of the modified code here.

Ryan Lanciaux

Hi 👋 I'm Ryan Lanciaux. I run Spaceship Studio, LLC. a consultancy specializing in fast and dynamic web and native mobile applications.

I live in Ann Arbor with my wonderful family! In my freetime, I create electronic music.

You should follow me on Twitter