I'm trying to use Istanbul along with Mocha in Node.js to run unit tests and generate code coverage reports. I'm using the following code to run run the unit tests and generate those code reports.
istanbul cover _mocha -- -R tap 'test/*.test.js' > test.tap; istanbul report clover
istanbul command redirects the output to
test.tap, so you are not going to see it on the console:
istanbul cover _mocha -- -R tap 'test/*.test.js' > test.tap; istanbul report clover ^^^^^^^^^^
The test output in
test.tap is not needed by Istanbul, so you could remove the redirection. If you want the command to continue writing the file, you could use the
tee command to write the test output to both the file and the console.