grunt-istanbul
grunt-istanbul copied to clipboard
Confusion with coverage numbers
I have the following code
var o = {}; o.tmp = function(c){ return { a : "model" b : function(...){ c.add(function(){ .... }); c.add(function(){ .... }); } } } o.tmp();
I understand that in this execution, the function "b" can not be executed. Using istanbul, I am getting following numbers : Statements : 55.56% ( 5/9 ) Branches : 100% ( 0/0 ) Functions : 25% ( 1/4 ) Lines : 55.56% ( 5/9 )
I don't understand how 55% of the function is executed. Most of the code is covered with the function declaration of "b". Also, what does (5/9) means? What are the 9 statements here? Thanks in advance, Monika