我的伊斯坦布尔测试覆盖率报告零

问题描述

尽管我的摩卡测试通过了,但我的覆盖范围仍然是全零:

  5 passing (12ms)

-----------|---------|----------|---------|---------|-------------------
File       | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-----------|---------|----------|---------|---------|-------------------
All files  |       0 |        0 |       0 |       0 |                   
 lib       |       0 |        0 |       0 |       0 |                   
  index.js |       0 |        0 |       0 |       0 | 3-28              
 src       |       0 |        0 |       0 |       0 |                   
  index.js |       0 |        0 |       0 |       0 | 2-20              
-----------|---------|----------|---------|---------|-------------------

package.json中的我的脚本部分如下:

  "scripts": {
    "lint": "eslint ./src","build": "npm run lint && babel ./src -d ./lib","test": "mocha --require babel-core/register","test-with-coverage": "nyc --all npm run test"
  },

我的nyc部分如下:

 "nyc": {
    "reporter": [
      "lcov","text"
    ]
  }

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)