getting started example doesn't give a result
In a fresh start I did:
mkdir test
cd test/
mkdir __tests__
touch sum.js
Then copied the example https://raw.githubusercontent.com/facebook/jest/master/examples/getting_started/sum.js
touch __tests__/sum-test.js
copied https://raw.githubusercontent.com/facebook/jest/master/examples/getting_started/tests/sum-test.js
npm install jest-cli --save-dev
npm init
in package.json I made sure I had
"scripts": {
"test": "jest"
},
npm test
[email protected] test /vagrant/test jest
Found 1 matching tests... vagrant@precise32:/vagrant/test$
And that's it.. I don't see any failed or success. What's wrong?
I'm getting the same thing - On OS X it outputs fine, but on the windows box it does not output anything after the Found 1 matching tests...
Ok, so I was using Parallels windows environment, you're using Vagrant, if you open up the src/TestRunner.js and on line 27 it's taking the number of CPUs -1, which in my case was 1-1, so it's not creating any workers.
So, is there a way around this? I can bump my parallels CPUs up to 2, but not sure on the vagrant side?
Edit: Link to file/line number - https://github.com/facebook/jest/blob/master/src/TestRunner.js#L27 Edit 2: Single core servers discrimination.
That seems like a bug that should be fixed in Jest.
I just had this exact issue and solved with
"scripts": {
"test": "jest --maxWorkers=1"
}
Now it worked using a new vagrant box hashicorp/precise64 before I was using precise32
Hmm, interesting. I also noticed this and was quite frustrated before I found out it was an issue related to Vagrant instead of my setup. Will try to provided solutions and get back.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.