Software development notes - Ryan Lanciaux

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(){
  process.exit(0);
});

See the diff of the modified code here.


Ryan LanciauxWritten by Ryan Lanciaux. Ryan is a developer based out of Ann Arbor who programs in many languages. He is the author of Griddle (react data-grid) and other various open source projects.

Follow him on twitter.