code for article pfeilbr/node-coveralls-playground
node-coveralls-playground
To learn and experiment with coveralls test coverage service.
Setup Steps
Install deps
$ npm install mocha coveralls mocha-lcov-reporter --save-dev
Install istanbul
$ npm install istanbul --save-dev -g
If running from command line, ensure
.coveralls.yml
is in current directory. It should contain a line withrepo_token: REPO_TOKEN
Running
To run on the tests in the test/
directory.
$ istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
You can view the raw coverage output in the
./coverage
directory.
Twitter • Reddit