I have an istanbul coverage that i use in my package.json like below.
"test:coverage": "./node_modules/.bin/babel-istanbul --include-all-sources cover ./node_modules/.bin/_mocha ./src/**/__tests__/*.js",
And i jave an .istanbul.yml
script like below.
verbose: true
instrumentation:
extension: .js
root: ./src
default-excludes: true
excludes: ['./src/**/__tests__/**', './src/electron.js']
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
I am trying to exclude the tests folder and the electron.js
files from the coverage. However , the file and the folder are not excluding. Please where do i go wrong and how can i fix this ? Any help would be appreciated.
Aucun commentaire:
Enregistrer un commentaire