May 5, 2016

node.js project coverage with && is great. however, the default instruction sets are tailored to ruby and travis. i use neither.

for many of us, we want coveralls to work with and nodejs.

the coveralls docs re-direct you to:, which helps us get the job done. however, you may like just a simple clear step-by-step.

Here are the steps, short and sweet:

// package.json
  "name": "MY-MODULE",
  "description": "A SUPER GREAT MODULE",
  "scripts": {
    "test": "nyc --reporter=lcov --check-coverage --functions=90 --branches=90 node test/"

npm test # or your test command  
cat ./coverage/ | ./node_modules/coveralls/bin/coveralls.js  


You're all done!

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket
Comments powered by Disqus