Skip to content
Easily configure a npm module to generate and upload tests coverage to
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Build Status Coverage Status


Easily configure a npm module to generate and upload tests coverage statistics to This module is focused for projects based on mocha as test library, pull-requests to add support for other testing libraries are welcome.

And of course, it's executed against itself! :-D

How to use easy-coveralls in 5 steps

  1. be sure your tests are passing on your CI server and that you has enabled your project on

  2. add the easy-coveralls dependency to your project:

    npm install --save-dev easy-coveralls
  3. add a script entry on your project package.json file for the test coverage:

      "scripts": {
        "coveralls": "easy-coveralls"
  4. configure your CI server to exec easy-coveralls.

    • For TravisCI add to your project .travis.yml file:
    - npm run coveralls
    • For SemaphoreCI just set npm run coveralls as a Post-Thread script.
  5. there's no fifth step. Ta-Da! :-D

How it works

easy-coveralls internally do several tasks. First it creates an instrumented version of your module or library and swap it with the original one. Later it exec the tests as usual generating a lcov compatible report in the case your tests works just by executing the mocha command and update the coverture statistics to, and finally it delete the instrumented library and restore your original one. No less, no more.

You can’t perform that action at this time.