I'm working on some new node.js modules / apps and I'm writing tests for the functions.
I'm looking into the code coverage for the first time. I just got istanbul
& mocha
up and running.
$ istanbul cover _mocha -- -R dot
And it prints out this nice report.
․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
225 passing (931ms)
=============================================================================
Writing coverage object [/endeavor/coverage/coverage.json]
Writing coverage reports at [/endeavor/coverage]
=============================================================================
=============================== Coverage summary ===============================
Statements : 87.59% ( 120/137 )
Branches : 87.5% ( 14/16 )
Functions : 74% ( 37/50 )
Lines : 87.5% ( 119/136 )
================================================================================
However I'm looking for specifics, like what functions aren't being tested or "aren't covered". Istanbul also creates some files within a coverage
directory, one of which is a html
file, with no more info then what I get in the terminal.
How do I get a report of functions that aren't being tested? Is there a way to get this information from Istanbul, or another module?
Aucun commentaire:
Enregistrer un commentaire