fishbar/jscoverage — pull request #9 by dfellis (2013-06-20 16:59:24+00:00)
Title: Easier integration with Coveralls with LCOV output

Hello,

I've been using jscoverage pretty extensively (since it was still a C++-based project run by a different maintainer), and recently I've started using it in conjunction with [coveralls.io](https://coveralls.io/) a code coverage tracking service, and the [node-coveralls](https://github.com/cainus/node-coveralls) interfacing lib.

To do this, I've [copy-pasted and modified the `coverageDetail` function](https://github.com/uber/redis-broadcast/blob/194baad902900a23f500f52b8fa4c5ace1fbbd3c/test/test.js#L151), which works, but is a bit ugly, so this morning I decided to create special exporter functions for the coverage summary and coverage detail functions (this PR), [which makes my jscoverage test function that integrates with coveralls *much* easier to read](https://github.com/uber/redis-broadcast/blob/master/test/test.js#L151), as you can see.

LCOV is a standard mechanism for listing code coverage, and can integrate not only with coveralls, but [gcov](http://gcc.gnu.org/onlinedocs/gcc/Gcov.html), [Hudson/Jenkins, through a converter](https://github.com/eriwen/lcov-to-cobertura-xml), and so on.

Similarly, I added a simple JSON object format for the coverage summary so once I get a library to 100% code coverage, dropping below 100% becomes a test failure.

I hope you find all this as useful as I have, and thank you for this great library. :)