黄色突出显示在伊斯坦布尔是什么意思?

What does yellow highlighting mean in istanbul?

我刚开始为 mocha 使用 istanbul 测试覆盖模块。当我查看报告时,一些代码以黄色突出显示。我在文档中找不到这是什么意思?

覆盖率报告中黄色突出显示表示该分支未被覆盖。

来自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)

这里有一个 SO post 更深入地分解了每一个的含义:How do I read an Istanbul Coverage Report?