Closed TomFrost closed 8 years ago
I've actually never tried to use babel-istanbul
with the --compilers
flag with mocha
. Since mocha
is doing the compiling with that flag enabled, it looks like all of the work babel-istanbul
does is actually defeated. I assume babel-istanbul
is being fed code that is already compiled.
Here is how I usually run my tests:
babel-node node_modules/.bin/babel-istanbul cover node_modules/.bin/_mocha -- ./test/src --recursive
Using babel-node
will allow you to run your code, but babel-istanbul
will also be able to read the original source instead of the already compiled mocha
source. Using this method, I only see my original source in coverage files.
Let me know if that works out for you. Thanks.
Brilliant! Thanks for the tip, everything looks great now. Excellent work on this :)
Hi there! I was very excited about this package, expecting my istanbul coverage report to switch from showing me already-transpiled code to my original ES6 source, but unfortunately when I drop-in-replaced this...
into this...
I still saw post-transpilation code. Am I misunderstanding what the effects are this library are, or am I using it incorrectly?
Thanks for your help and time!