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?
Yellow The most common of the highlighters used — unless you’re a girl, of course — highlighting something in yellow is often misinterpreted as your understanding that the highlighted item is more important than what is not highlighted, but not as important as something highlighted in a less commonly used colour.
Not executed lines, or pieces of code, will be highlighted in red. This has been verified for Istanbul v0.4.0, I'm not sure if this still applies for subsequent versions, but being that library is based on solid theoretic principles, behavior shouldn't change too much for newer versions. Pink: statements not covered. Orange: functions not covered.
Yellow highlighting in the coverage report means that the branch has not been covered. 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)
Some think that items highlighted in orange are being put off until the end of October. Others just assume it was the only highlighter at hand. Actual meaning: These items will be done either at sunrise or sunset on a day near the end of October. Known as the “royal colour,” this colour was used to highlight things that were of extreme importance.
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With