Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusion with coverage numbers #50

Open
monikadhok opened this issue Feb 24, 2017 · 0 comments
Open

Confusion with coverage numbers #50

monikadhok opened this issue Feb 24, 2017 · 0 comments

Comments

@monikadhok
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant