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?
Anais Urlichs · Dec 22, 2020. Coveralls is a web service that allows users to track the code coverage of their application over time in order to optimize the effectiveness of their unit tests.
Code coverage is a software-testing metric that determines how many lines of code have successfully validated under a test suite, and is usually measured with specialized tools like Codecov.
Coveralls is a web service to help you track your code coverage over time, and ensure that all your new code is fully covered.
Code Coverage Percentage = (Number of lines of code executed by a testing algorithm/Total number of lines of code in a system component) * 100.
I used gulp and a coveralls plugin to accomplish this:
http://gulpjs.com/
https://www.npmjs.org/package/gulp-coveralls
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With