我有Karma运行Jasmine测试。我使用npm
脚本运行这些脚本,最终使用Angular CLI的ng test
。
当我尝试使用xdescribe
,xit
,fdescribe
或fit
时,我的测试会按预期运行,但我看到错误。
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
也在中止。
这是否因设计失败?这取决于记者吗?
答案 0 :(得分:1)
结果是失败的覆盖率阈值。显然,排除一些或几乎所有的规格或套件会严重影响覆盖范围。