gotwarlost / istanbul

Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k stars 785 forks source link

Combined run of istanbul with mocha and jasmine #874

Open mario-paniccia opened 6 years ago

mario-paniccia commented 6 years ago

I have an existing test suite that runs unit tests with jasmine and end to end test with mocha:

"scripts": { "test": "jasmine-node test/spec/ --forceexit", "e2e-test": "mocha test/e2e --timeout 15000", ... },

I'm trying to run an combined istanbul coverage report which considers both unit tests and end 2 end test with the following: "test:coverage": "istanbul cover _mocha -- --timeout 15000 'test/e2e/*.spec.js' jasmine-node test/spec/ -- --forceexit"

but this is running only mocha end 2 end tests How can I achieve that? Thanks