small medium large xlarge

Back to: All Forums  React for Real
04 Sep 2017, 20:59
Kel Cecil (1 post)

I’m really enjoying React for Real so far, but I ran into an issue people may run into in Chapter 4. I received an error that looked like the following:

Determining test suites to run...Error: This promise must be present when running with -o.
    at /Users/kelcecil/code/react-for-real/wordcounter-single/node_modules/jest/node_modules/jest-cli/build/search_source.js:192:17
    at (<anonymous>)
    at step (/Users/kelcecil/code/react-for-real/wordcounter-single/node_modules/jest/node_modules/jest-cli/build/search_source.js:20:362)

There appears to be a bug in Jest v21.0.1 where you’ll see this error if you run jest --watch in a directory without a git metadata (.git) directory. You can workaround by running git init in your project directory to create the git metadata directory or by downgrading Jest to v20.0.4.

You can follow the relevant bug report at Github. Hope this helps!

04 Sep 2017, 21:19
Ludovico Fischer (3 posts)

Thank you for your report. It definitely looks like a Jest bug, so let’s hope they fix it soon. Luckily Jest 21 was released just 6 hours ago, so the damage windows should be small. Real breakage will probably occur with Enzyme once Enzyme 3 releases for React 16 compatibility; but I am not sure API changes are definitive yet.

You must be logged in to comment