You have to run istanbul cover
against the tests that are run.
The example in the docs is a bit unclear about this: istanbul cover test.js
assumes that test.js
is the executable that is running all your tests, not the test itself.
For example, if you're using mocha
as your test runner, it should look like istanbul cover node_modules/.bin/_mocha
(assuming mocha is installed as local devDependency) or istanbul cover mocha
, if it's installed as global module.