N
N
n0thing2014-09-25 21:39:03
Angular
n0thing, 2014-09-25 21:39:03

"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
84a3a617f3024634871059902d4f2c59.png
. 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

3 answer(s)
I
iKBAHT, 2014-10-16
@iKBAHT

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

T
TekVanDo, 2014-09-26
@TekVanDo

I can assume that it swears that else in this case is redundant. Try to remove else and move return false below.

H
hellboy1981, 2015-02-10
@hellboy1981

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 question

Ask a Question

731 491 924 answers to any question