Richard Walker
Richard Walker

Reputation: 169

Combining code coverage reports in javascript for coveralls

I have node.js based projects that also include client side code. I have 2 separate unit test suites, 1 for front end and 1 for back end. I currently have mocha running using blanket for code coverage and piping the result into the coveralls module like so:

mocha --require blanket --reporter mocha-lcov-reporter server/test/unit | ./node_modules/.bin/coveralls

I essentially need to combine the output of these 2 test runs (server and client):

mocha --require blanket --reporter mocha-lcov-reporter server/test/unit

and

mocha --require blanket --reporter mocha-lcov-reporter client/test/unit

and pipe that into the coveralls module.

Is this possible? How would I do this?

Upvotes: 6

Views: 1142

Answers (1)

pgoldrbx
pgoldrbx

Reputation: 31

I used gulp and a coveralls plugin to accomplish this:

http://gulpjs.com/

https://www.npmjs.org/package/gulp-coveralls

Upvotes: 2

Related Questions