diff options
| author | Gregg Caines <[email protected]> | 2013-06-21 11:29:26 -0600 |
|---|---|---|
| committer | Gregg Caines <[email protected]> | 2013-06-21 11:29:26 -0600 |
| commit | 339af5a9326509bf5c05a0d38af4a1669dd239e5 (patch) | |
| tree | 6dc2f6492b8c82f5f649776ad51477d11281c36b | |
| parent | 35d261302059675a69e2cecdb84598f29f311fbb (diff) | |
| download | node-coveralls-339af5a9326509bf5c05a0d38af4a1669dd239e5.tar.xz node-coveralls-339af5a9326509bf5c05a0d38af4a1669dd239e5.zip | |
Update README.md
| -rw-r--r-- | README.md | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -21,7 +21,17 @@ This script ( `bin/coveralls.js` ) can take standard input from any tool that em Once your app is instrumented for coverage, and building, you just need to pipe the lcov output to `./node_modules/coveralls/bin/coveralls.js`. -###JSCoverage +###[Blanket.js](https://github.com/alex-seville/blanket) +- Install [blanket.js](http://blanketjs.org/) +- Configure blanket according to [docs](https://github.com/alex-seville/blanket/blob/master/docs/getting_started_node.md). +- Run your tests with a command like this: + +```sh +NODE_ENV=test YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha \ + --require blanket \ + --reporter mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js +``` +###[JSCoverage](https://github.com/fishbar/jscoverage) Instrumenting your app for coverage is probably harder than it needs to be (read [here](http://www.seejohncode.com/2012/03/13/setting-up-mocha-jscoverage/) or [here](http://tjholowaychuk.com/post/18175682663/mocha-test-coverage)), but that's also a necessary step. @@ -29,10 +39,13 @@ In mocha, if you've got your code instrumented for coverage, the command for a t ```console YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha test -R mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js ``` +Check out an example [Makefile](https://github.com/cainus/urlgrey/blob/master/Makefile) from one of my projects for an example, especially the test-coveralls build target. Note: Travis runs `npm test`, so whatever target you create in your Makefile must be the target that `npm test` runs (This is set in package.json's 'scripts' property). + +##[Istanbul](https://github.com/gotwarlost/istanbul) +TODO ## Running locally If you're running locally, you must have a `.coveralls.yml` file, as documented in [their documentation](https://coveralls.io/docs/ruby), with your `repo_token` in it; or, you must provide a `COVERALLS_REPO_TOKEN` environment-variable on the command-line. -Check out an example [Makefile](https://github.com/cainus/urlgrey/blob/master/Makefile) from one of my projects for an example, especially the test-coveralls build target. Note: Travis runs `npm test`, so whatever target you create in your Makefile must be the target that `npm test` runs (This is set in package.json's 'scripts' property). |
