10

I just started using istanbul test coverage module for mocha. When I look at the report some code is yellow highlighted. I could not find in the docs what this means?

bier hier
  • 13,692
  • 28
  • 72
  • 140

1 Answers1

12

Yellow highlighting in the coverage report means that the branch has not been covered.

From a GitHub issue:

  • Pink: statement not covered
  • Orange: function not covered
  • Yellow: branch not covered
  • [I] and [E] in front of if-else statements: if or else not covered respectively
  • Branch coverage display only kicks in if one or more but not all branches have been taken (if none of the branches were taken the statement coverage will show you that unambiguously)

Here's an SO post that breaks down what each of those mean in a little more depth: How do I read an Istanbul Coverage Report?

Community
  • 1
  • 1
mzmm56
  • 1,199
  • 1
  • 13
  • 21