Working demo with babel6 + karma
fernandofleury opened this issue · 5 comments
I've bumping my head to make proper babel6 code coverage using isparta + karma.
Right now this is the error I get from it:
Post-processing using source maps Nothing mapped from file:
My karma config:
coverageReporter: {
instrumenters: {
isparta : require('isparta')
},
instrumenter: {
'*.js': 'isparta'
}
},
babelPreprocessor: {
options: {
sourceMap: 'inline'
}
},
Same here, without karma. I just get No coverage information was collected, exit without writing coverage information
with no other information or error output.
This is my example of generating es6 coverage report with karma + karma-browserify + isparta(v4).
https://github.com/kt3k/karma-browserify-isparta-example
https://codecov.io/github/kt3k/karma-browserify-isparta-example?branch=master
@kt3k That's a pretty clever ideia. I've managed to make it work as well!
Currently istanbul's official babel-plugin-istanbul can instrument es6 code. I think that is now the most reliable way to create coverage report of es6 scripts.