Jasmine的排除/焦点操作导致退出状态1

时间:2017-11-16 18:02:48

标签: jasmine karma-runner angular-cli

我有Karma运行Jasmine测试。我使用npm脚本运行这些脚本,最终使用Angular CLI的ng test

当我尝试使用xdescribexitfdescribefit时,我的测试会按预期运行,但我看到错误。

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! {my package@version} test-watch: `ng test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the {my package@version} test-watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm大声抱怨错误。 ng test没有抱怨,但没有进入观察状态。我认为由于退出状态,ng也在中止。

这是否因设计失败?这取决于记者吗?

1 个答案:

答案 0 :(得分:1)

结果是失败的覆盖率阈值。显然,排除一些或几乎所有的规格或套件会严重影响覆盖范围。