Answer the question
In order to leave comments, you need to log in
"else path not taken" in istanbul code coverage. How to fix?
I check the coverage of Angularjs code with tests (karma) using Istanbul'a, and throughout the code it gives similar errors for if's
. What is the essence of the error and how can I fix it?
Answer the question
In order to leave comments, you need to log in
This means that your tests never entered the else branch. Come up with such a test to get there and the error will go away
I can assume that it swears that else in this case is redundant. Try to remove else and move return false below.
proof
Now to find out exactly what this line does.
PS Still is if path not taken
Threat. Threat. And this is not a mistake.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question