Skip to content
This repository has been archived by the owner on Oct 15, 2017. It is now read-only.

npm run check-coverage not working on Windows #9

Closed
nyrosmith opened this issue Mar 17, 2016 · 5 comments
Closed

npm run check-coverage not working on Windows #9

nyrosmith opened this issue Mar 17, 2016 · 5 comments

Comments

@nyrosmith
Copy link
Collaborator

This command always fails with ERROR: no coverage files found.
I found this nyc issue but there they only talk about Node v5.8.0 and NPM v3.7.3
My setup = Node v5.9.0 and NPM v3.8.1

@kentcdodds
Copy link
Owner

I'm sure you are, but just to be sure, make sure that you first run npm run cover and that you get the text output indicating that there was coverage recorded. Then check your filesystem and you should see a coverage/ folder with stuff in there..

@nyrosmith
Copy link
Collaborator Author

I should have mentioned that I ran npm run cover before. It is not working at all. Hopefully I'll find a solution soon

@sarbbottam
Copy link
Collaborator

replacing
"cover": "nyc --reporter=lcov --reporter=text --reporter=html npm run test",
with
"cover": "nyc --reporter=lcov --reporter=text --reporter=html ava \"src/**/*.test.js\" --require babel-register --coverage",

solves the issue for me.

Happy to raise a PR for the same.

nyc-coverage

@kentcdodds
Copy link
Owner

That's odd, but cool. Could you please make a PR and I'd like @nyrosmith to try it out.

@sarbbottam
Copy link
Collaborator

Sure would do that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants