benoitvallon / react-native-nw-react-calculator

Mobile, desktop and website Apps with the same code
MIT License
5.21k stars 865 forks source link

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

Open sevagsim opened 8 years ago

sevagsim commented 8 years ago

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

benoitvallon commented 8 years ago

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.

sevagsim commented 8 years ago

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

benoitvallon commented 8 years ago

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.