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-devInstall istanbul
$ npm install istanbul --save-dev -gIf running from command line, ensure
.coveralls.ymlis 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
./coveragedirectory.
Twitter • Reddit