Margus Pala
Margus Pala

Reputation: 8663

Cypress with Istanbul is not generating code coverage reports

I have VueJS app and Cypress for testing. I need to have code coverage info.

Running tests in Cypress is generating seemingly correct .nyc_output/out.json file with numbers how many times some lines were executed.

How to generate correct report?

Problem is that npx nyc report says that everything is 0% enter image description here

tree .nyc_output/

enter image description here

Sample from the out.json where numbers are different from zero enter image description here

Upvotes: 9

Views: 4578

Answers (1)

Q. Pham
Q. Pham

Reputation: 11

For me, downgrading nyc version solved it

npx [email protected] report

Upvotes: 1

Related Questions