mozilla/openbadges-validator — pull request #17 by stenington (2013-08-27 16:02:13+00:00)
Title: Add code coverage

Given how essential this module is becoming, knowing our test code coverage would be good.

The [experimental code coverage] offered through `node-tap` wasn't working. It seems like `node-burrito` can't handle the full range of valid javascript syntax, or somehow the instrumentation of the code for coverage was otherwise generating invalid javascript.

I looked at using `jscoverage` since that plays well with `mocha`, but it doesn't seem super amenable to the `node-tap` style of doing things.

I ended up using [node-cover][], which is a little weird but works in the end. You can run it with `make test-cov` and the output html looks like [this][cover-html].

[cover-html]: http://stenington.org/coverage/
[node-cover]: https://github.com/itay/node-cover