vistaprint / grunt-js-test

Grunt plugin to run client-side, mocha unit tests and generate code coverage reports
10 stars 11 forks source link

Now allow the user to specify the output format of the coverage test #13

Closed victorquinn closed 9 years ago

victorquinn commented 9 years ago

The impetus behind this change is that currently this library will only spit out the coverage report in html format.

In order to work with tools like Coveralls, it needs the report in a machine-readable format (lcov).

This pull request still keeps the default at html for istanbul and whatever the default is for jscover when none are specified but also now allows the developer to optionally configure a specific format in the options in grunt for either reporter.

Sample grunt config for lcov rather than html coverage report below:

options: {
    coverage: true,
    coverageFormat: 'lcov'
}
texclayton commented 9 years ago

Sorry it took so long to take a look at this. I was on vacation all last week. Thanks for making this change. I had it on my personal ToDo to make the coverage tests work with Coveralls but hadn't had a chance to look into it yet.