【问题标题】:nyc(istanbul) reporters are hiding the reasons for test failures纽约(伊斯坦布尔)记者隐瞒了测试失败的原因
【发布时间】:2017-08-03 11:17:44
【问题描述】:

我正在使用 mocha 测试我的 JS 代码,但是我无法在命令提示符中看到错误报告(错误原因) 当我使用伊斯坦布尔的记者时。

如果我使用以下命令,我会收到错误报告。

"nyc mocha test/testSetup.js \"test/**/*.test.js\""

如果我使用以下命令,我不会收到错误报告。

"nyc report --reporter=lcov --reporter=text mocha test/testSetup.js \"test/**/*.test.js\""

请建议我可以获得错误报告、命令行覆盖率报告和 html 覆盖率报告的确切命令。

【问题讨论】:

  • 如果你安装了 istanbul 和 mocha 为什么不直接运行istanbul cover _mocha

标签: javascript unit-testing mocha.js istanbul


【解决方案1】:

试试这个:

nyc mocha --reporter spec test/testSetup.js \"test/**/*.test.js\""

【讨论】:

    猜你喜欢
    • 2017-06-26
    • 2020-01-24
    • 2020-08-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-26
    • 2015-07-29
    • 2016-04-05
    相关资源
    最近更新 更多