kriskowal/q — pull request #71 by domenic (2012-05-16 02:46:05+00:00)
Title: Code coverage

Uses itay/node-cover. Run with:

npm run-script test-cover
npm run-script spec-cover

Both will generate cover_html folders with an index.html containing the coverage report. There unfortunately doesn't seem to be a cross-platform way of automatically launching that index.html in your default browser [1].

This reveals a few missing spots, in addition to large swathes of untested-but-that's-OK code (like shims and long stack trace code).

Ideally we would be able to run this in different browser environments (e.g. to make sure the shims are covered), but that would require a decent bit more work, I believe.

NB some small additions were necessary to make the Jasmine specs run in Node.

[1]: http://superuser.com/questions/38984/linux-equivalent-command-for-open-command-on-mac-windows

---

Also Travis just emailed me saying [the build failed](http://travis-ci.org/#!/kriskowal/q/jobs/1342035), I guess because jasmine-node requires a package that requires node more recent than 0.4, which we are apparently building against. So, that looks bad :-/. Guess I should have put this in a personal branch?