react-native-nw-react-calculator icon indicating copy to clipboard operation
react-native-nw-react-calculator copied to clipboard

Fix Jest CLI error causing Jest tests to not run (using Jest CLI v 0.…

Open sevagsim opened this issue 10 years ago • 3 comments

There is an error when running npm test using Jest CLI v.0.7.1

It is due to how package.json is being used in the dependency read-package-tree. This should be excluded from the test suite.

Before: Test suite does not run After: Test suite runs and successfully passes

sevagsim avatar Nov 05 '15 22:11 sevagsim

I am using jest v0.7.1 on my machine as well and I have no problem. If you look at the CI on travis https://travis-ci.org/benoitvallon/react-native-nw-react-calculator the tests run correctly as well.

Depending of which version of npm you are using you may have had issues when npm install, I noticed that sometimes with the first versions of npm v3. I had to npm install 2 or 3 times.

benoitvallon avatar Nov 06 '15 02:11 benoitvallon

Note that I used the following instructions, because I have NPM v2.14.7, and no matter how many times I go do npm install i get the same error.

screen shot 2015-11-06 at 10 05 23 am

sevagsim avatar Nov 06 '15 18:11 sevagsim

Oh sorry, I realized that I made some modifications to the readme that made it confusing. If you are using npm v2 npm installshould work fine.

The special instructions are for people using one of the first version of npm v3.

benoitvallon avatar Nov 06 '15 18:11 benoitvallon