I am trying to get Istanbul to work.
I keep getting this message at the end of running istanbul:
No coverage information was collected, exit without writing coverage information
I have tried everything I could find online as you can see:
"scripts": {
"start": "node ./bin/start.js",
"test": "mocha test --no-timeouts",
"debug_mocha": "node-debug --no-timeouts _mocha",
"eslint": "eslint .",
"jshint": "jshint --exclude ./node_modules .",
"istanbul": "istanbul cover --include-all-sources --hook-run-in-context node_modules/.bin/_mocha -- -u exports -R spec test/**/*",
"istanbul2":"istanbul cover node_modules/.bin/_mocha -- -u exports -R spec test/**/*",
"istanbul1":"istanbul cover node_modules/.bin/_mocha -- test/**/*",
"istanbul0":"istanbul cover _mocha test/**/*.js",
"istanbul3":"istanbul cover _mocha -- -R spec --recursive test"
}
my .istanbul.yml file is at the root of the project and looks like istanbul is picking it up successfully.
//.istanbul.yml
instrumentation:
compact: false
save-baseline: true
reporting:
reports:
- lcov
- cobertura
What am I missing?
Got it, finally.
https://github.com/gotwarlost/istanbul/issues/44#issuecomment-57708358 says:
Then, after a little experimentation, victory: