测试失败了,没有任何错误,只有上面的消息。
我的测试脚本是:
"test": "TEST=true tape test/core/*.js test/core/ui/user-interface.js test/core/modules/QR.js | tap-spec; browserify test/core/modules/image-sequencer.js test/core/modules/chain.js test/core/modules/meta-modules.js test/core/modules/replace.js test/core/modules/import-export.js test/core/modules/run.js test/core/modules/dynamic-imports.js test/core/util/parse-input.js test/core/modules/benchmark.js| tape-run --render="tap-spec"", 规格:
发布于 2022-03-24 21:23:53
您可以验证是否在项目中配置了任何阈值。
根据jest文档,https://jestjs.io/docs/configuration,如果您在jest.config.js上设置了一个"coverageThreshold“,根据下面的配置,如果分支、行和功能覆盖率小于80%,那么测试将失败。
"coverageThreshold": {
"global": {
"branches": 80,
"functions": 80,
"lines": 80,
"statements": -10
}
}您可以通过所有测试,但如果您不完成指定的阈值,则jest将失败。此外,它没有在错误日志中给出任何提示。
我的角度项目也有同样的问题,这是由于这个配置。
https://stackoverflow.com/questions/55201569
复制相似问题