获取需要使用代码覆盖率进行测试的特定功能

时间:2015-08-27 05:56:08

标签: node.js unit-testing code-coverage mocha istanbul

我正在开发一些新的node.js模块/应用程序,我正在为这些函数编写测试。

我第一次查看代码覆盖率。我刚刚得到istanbul& mocha启动并运行。

$ istanbul cover _mocha -- -R dot    

它打印出这个漂亮的报告。

․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․

  225 passing (931ms)

=============================================================================
Writing coverage object [/endeavor/coverage/coverage.json]
Writing coverage reports at [/endeavor/coverage]
=============================================================================

=============================== Coverage summary ===============================
Statements   : 87.59% ( 120/137 )
Branches     : 87.5% ( 14/16 )
Functions    : 74% ( 37/50 )
Lines        : 87.5% ( 119/136 )
================================================================================

但是,我正在寻找具体内容,例如哪些功能未经过测试或未被覆盖"。伊斯坦布尔还在coverage目录中创建了一些文件,其中一个是html文件,没有更多信息,而是我在终端中获得的信息。

如何获得未经过测试的功能报告?有没有办法从伊斯坦布尔或其他模块获取此信息?

0 个答案:

没有答案