jeudi 22 janvier 2015

Istanbul/Mocha Files Not Showing Up

So I have this node script that I use to run my mocha tests with istanbul for code coverage:


http://ift.tt/1t2Nb9C


On line 18 I get the list of files that should be included for code coverage so that on lines 34 and 49, I limit adding the istanbul coverage code to only the files that are relevant for the project.


The issue I am seeing is that if one of those files retrieved on line 18 is never called, it does now show up in the report. Now this should never happen but if someone creates a new file but forgets to write tests for it (again, should never happen), I would like the file to show up with a 0% for the coverage stats.


Is there a way to get files that are never called to show up in the report as 0% just so that I can be sure no file has been completely missed from testing?


Aucun commentaire:

Enregistrer un commentaire