mocha options
Closed this issue · 3 comments
Thanks for your work on this project.
I'm attempting to run:
babel-istanbul cover -x <some_file> _mocha -- -R spec <some_file> --compilers js:babel-register
With the compilers option, my tests run fine with es6 but as for the babel-istanbul coverage I get:
No coverage information was collected, exit without writing coverage information
Without the compiler option, I get the coverage summary but of course without using es6.
When you use the compilers
flag, a new process is spawned by the babel-register
compiler. Istanbul does not work with multiple processes. You should however be able to run your tests with babel-node instead of node like so:
babel-node node_modules/.bin/babel-istanbul cover -x <some_file> _mocha -- -R spec <some_file>
Thanks for the response. Mocha is still not recognizing es6 but I suppose this could be a mocha issue or more likely I have something setup wrong.
@jmcriffey babel-istanbul
with/without babel-node will work fine for running tests that cover es6 but my tests can't be written in it. I'm uncertain if that distinction was expressed in my original post but this will be fine for my purpose.