【发布时间】:2018-05-16 20:50:43
【问题描述】:
我在package.json 中的test 脚本是:
"test": "yarn seed && (nyc mocha --opts ./test/mocha.unit.opts)",
我的mocha.unit.opts 是:
--require ts-node/register
--require source-map-support/register
--require ./test/unit/helper.ts
--recursive
./test/unit/**/*.spec.ts
--exit
不过,没有错误。它显示了覆盖率(以某种方式全部 100%)并退出:
error Command failed with exit code 1.
当我运行yarn test
我错过了什么?
【问题讨论】:
-
直接运行mocha命令会发生什么?
标签: typescript mocha.js