react-slingshot: `test:cover` results in "No coverage information was collected, exit without writing coverage information"
Node version:
6.3.0
npm version:
3.10.3
Operating system:
OSX
Command line used:
zsh
Steps to reproduce:
npm run test:cover
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 32 (13 by maintainers)
It seems it broke with istanbul 0.4.5 https://github.com/douglasduteil/isparta/issues/123 https://github.com/douglasduteil/isparta/issues/126
I had similar problem on windows as you guys describe, and installing (–save-dev) istanbul 0.4.4 worked for me.
Got 'em: https://github.com/coryhouse/react-slingshot/pull/358
Thanks for your help @kentcdodds, and @kwelch for the link.
Oh good, I’m glad I was doing it wrong. whew!
Edit: And hey Kent! Thanks for the video 💯
You’ll need to fork the repo. You’ll learn about that in the course 😃
I’ve committed thousands of PRs professionally, but this would likely be my first open source contribution 💃
For some reason, I cannot submit a new branch to this repository.
I’ll see if that egghead video has any insight. In the mean time, should I not be using the
sshpath to clone and push? I cleared out my ssh keys, generated a new one and added it to GitHub, but no dice.Also, odd that it says
could not read… I just cloned you, repo!@kwelch I’d love to see a PR on Jest! 👍
I’m eager to try it but have read enough to know it sounds like a slam dunk now.
@mherodev There is a good egghead video by @kentcdodds if this is your first PR. 👍
@nickytonline I am looking to carve out time this week to wrapping that up. The tests run successfully, but output is still excessive and I have not touched coverage.
The branch is directly on this repo so PRs/commits to that branch are welcome with anything that will move the needle forward.
I am using Jest in my new course @oshalygin. I’ve lost patience with trying to keep code coverage working with Mocha. It just seems to be a house of cards. I’d like to move Slingshot to Jest since it has a much simpler config story, snapshot tests, and code coverage built in. I’d welcome a PR from anyone willing.
I am not able to see even the absent output. When I run
npm run test:coverI run into an ELIFECYCLE error.Great find @ArcanisCz !
Hrmm, now question is, how can I fix this for everyone? Istanbul is not a direct dependency since Isparta merely uses it behind the scenes. So I believe we have to wait until either Isparta changes their reference or Istanbul fixes the bug.
And in other news, I’m strongly considering moving the project to Jest since it includes this built in and is generally now considered the best option for React dev.
Same issue here. When running on the native Mac terminal it gives no coverage information. However if I change the path to _mocha from
/node_modules/mocha/bin/_mochato just_mochait does give coverage information.Running the same on a windows machine (through VSTS, Visual Studio Team Service builds), it gives no coverage information either with the
/node_modules/mocha/bin/_mochapath, but even crashes when I try just the_mochapart (as stated in the comments of PR #246).So it seems the issue is not with the path to _mocha?
Can you try on the native Mac terminal? Runs fine for me there.