An npm module for using Karma and Coveralls with Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-karma-coveralls --save-dev
coveralls:options:debug: truecoverageDir: 'directory name'dryRun: trueforce: truerecursive: true
Using this option you can run coverage without sending data to the coveralls service and instead writing the results to coveralls.json.
Using this option you can ensure that if there is a failure, ie: the coveralls service is down, your grunt tasks will continue to run and not terminate due to the error.
This option defaults to
true. If it is set to true
coverageDir will be searched recursively for
Otherwise the subdirectories will be ignored.
If you haven't used Karma before, check out the video on the homepage.
reporters: 'coverage'preprocessors:"**/lib/*js": "coverage"coverageReporter:type: "lcov"dir: "coverage/"plugins:'karma-coverage'