Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 913
Margus Pala Avatar asked Nov 06 '22 14:11

Margus Pala


1 Answers

For me, downgrading nyc version solved it

npx [email protected] report
like image 192
Q. Pham Avatar answered Nov 12 '22 10:11

Q. Pham