請問有誰知道我可以如何解決這個問題?我有我的測試:覆蓋範圍定義如下。沒有收集覆蓋範圍信息,沒有寫入覆蓋範圍信息退出,伊斯坦布爾覆蓋範圍
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。但是,標題中的無覆蓋消息仍然存在,並且覆蓋文件夾仍然保持空白。請問我哪裏錯了?任何幫助,將不勝感激。