aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregg Caines <[email protected]>2013-03-28 13:26:27 -0700
committerGregg Caines <[email protected]>2013-03-28 13:26:27 -0700
commit3b0c6fdc358ea3899ba4c660bc19db16082a210f (patch)
treef9c3c5e8743cd0f3abb4a3966b3199802de14264
parent5b2ed846c142ccdcd28b309a6b8bd76b2d0b96be (diff)
downloadnode-coveralls-3b0c6fdc358ea3899ba4c660bc19db16082a210f.tar.xz
node-coveralls-3b0c6fdc358ea3899ba4c660bc19db16082a210f.zip
Update README.md
-rw-r--r--README.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/README.md b/README.md
index 75766fd..1eebbb1 100644
--- a/README.md
+++ b/README.md
@@ -11,5 +11,11 @@ Instrumenting your app for coverage is probably harder than it needs to be (read
Once your app is instrumented for coverage, and building in travis-ci, you just need to pipe the lcov output to `./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. Also note that the TRAVIS_JOB_ID is necessary.
+In mocha, if you've got your code instrumented for coverage, the command for a travis build would look something like this:
+```console
+YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha test -R mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js
+```
+Note: this will only run on travis-ci, where a necessary TRAVIS_JOB_ID environment variable will exist.
+
+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).