You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't an issue with any of the code itself, but it's still an issue that I encountered while working through the book. Posting it here may help others. (It might be also be worth posting a correction to the book's text that makes jest-cli <0.5 a requirement.)
For the tests in Chapter 8, the book uses jest-cli version 0.4.18. However, the current version of jest-cli is 0.5.1, and version 0.5.1 is what will be installed if you enter the exact command presented in Chapter 8 (npm install –-save-dev jest-cli). The major problem here is that any version of jest-cli greater than 0.4 will not support the current version of Node.js (0.12), or any version below that (see this link for some discussion: jestjs/jest#243), and therefore the tests in the book will not work at all. The simplest solution, if you are using Node (and not io.js), is to force installation of jest-cli < 0.5, using a command like this:
npm install --save-dev jest-cli@^0.4
This will install a version of jest-cli >=0.4 and <0.5, and all should work from there.
The text was updated successfully, but these errors were encountered:
jmrog
changed the title
jest-cli tests don't work (without shim) for jest-cli version 0.5+
jest-cli version 0.5+ won't work with current version of Node; should require jest-cli <0.5
Sep 6, 2015
This isn't an issue with any of the code itself, but it's still an issue that I encountered while working through the book. Posting it here may help others. (It might be also be worth posting a correction to the book's text that makes jest-cli <0.5 a requirement.)
For the tests in Chapter 8, the book uses jest-cli version 0.4.18. However, the current version of jest-cli is 0.5.1, and version 0.5.1 is what will be installed if you enter the exact command presented in Chapter 8 (
npm install –-save-dev jest-cli
). The major problem here is that any version of jest-cli greater than 0.4 will not support the current version of Node.js (0.12), or any version below that (see this link for some discussion: jestjs/jest#243), and therefore the tests in the book will not work at all. The simplest solution, if you are using Node (and not io.js), is to force installation of jest-cli < 0.5, using a command like this:npm install --save-dev jest-cli@^0.4
This will install a version of jest-cli >=0.4 and <0.5, and all should work from there.
The text was updated successfully, but these errors were encountered: