请问有谁知道我可以如何解决这个问题?我有我的测试:覆盖范围定义如下。没有收集覆盖范围信息,没有写入覆盖范围信息退出,伊斯坦布尔覆盖范围
scripts{
"test:coverage": "babel-node ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha ./src/_utils/__tests__/*.js"
}
,当我运行
npm run test:coverage
我的摩卡运行良好和一切OK。但是我的伊斯坦布尔报道最终在标题中回复了这个消息。而且,我的覆盖文件夹保持空白。通过在线阅读后,我确信我必须添加.istanbul.yml
文件。然后我开始并添加以下
verbose: false
instrumentation:
root: ./node_modules/.bin/istanbul
default-excludes: true
excludes: []
embed-source: false
variable: __coverage__
compact: true
preserve-comments: false
complete-copy: false
save-baseline: false
baseline-file: ./coverage/coverage-baseline.json
reporting:
print: summary
reports:
- lcov
dir: ./coverage
watermarks:
statements: [50, 80]
lines: [50, 80]
functions: [50, 80]
branches: [50, 80]
hooks:
hook-run-in-context: false
post-require-hook: null
我运行后我的测试:再次覆盖,以前的伊斯坦布尔错误dispappear。但是,标题中的无覆盖消息仍然存在,并且覆盖文件夹仍然保持空白。请问我哪里错了?任何帮助,将不胜感激。