1

I am using tape and istanbul to write unit tests in my Node.js project and the result is the following:

Statements   : 93.04% ( 107/115 )
Branches     : 86.84% ( 33/38 )
Functions    : 90% ( 27/30 )
Lines        : 93.86% ( 107/114 )

Is there a way to find out which statements, functions or portion of the code is left untested?

Marko Rochevski
  • 1,184
  • 8
  • 12

1 Answers1

2

According to the doc you should find a complete html report under ./coverage with line by line coverage :

and this should produce a coverage.json, lcov.info and lcov-report/*html under ./coverage Sample of code coverage reports produced by this tool (for this tool!): HTML reports

Doc : https://github.com/gotwarlost/istanbul#getting-started

Gabriel Bleu
  • 9,703
  • 2
  • 30
  • 43
  • `istanbul` wasn't generating a .html file in the coverage folder because I was calling the script with `istanbul cover --root ./server --report cobertura ./server/all-tests.js` instead of a `--report html` parameter. Thank you :D – Marko Rochevski Jul 17 '18 at 11:41