benderjs-coverage
Version:
Code coverage plugin for Bender.js
91 lines (54 loc) • 1.9 kB
Markdown
Code coverage plugin for Bender.js.
Generates code coverage reports using [Istanbul](http://gotwarlost.github.io/istanbul/).
Works in `bender run` mode and for bender jobs.
Links to the detailed coverage reports are available on the job's page after it's completed.
```
npm install benderjs-coverage
```
Add `benderjs-coverage` to the plugins array in your `bender.js` configuration file:
```js
var config = {
applications: {...}
browsers: [...],
plugins: ['benderjs-jasmine', 'benderjs-coverage'], // load the plugin
tests: {...}
};
module.exports = config;
```
Add the coverage plugin configuration:
```js
var config = {
applications: {...},
// add your plugin configuration
coverage: {
paths: [
'lib/**/*.js'
]
},
browsers: [...],
plugins: ['benderjs-jasmine', 'benderjs-coverage'], // load the plugin
tests: {...}
};
module.exports = config;
```
*(Required)*
An array of file path matchers used to mark which files should be preprocessed by this plugin.
It uses globstar matching using [minimatch](https://github.com/isaacs/minimatch).
*(Optional)*
**Default:** coverage/
A path to the directory where the coverage reports for `bender run` command will be put.
*(Optional)*
**Default:** html
A type of the coverage report. Check [Istanbul website](http://gotwarlost.github.io/istanbul/) for available values.
*(Optional)*
Configuration options for the Istanbul Instrumenter. Check [Istanbul website](http://gotwarlost.github.io/istanbul/) for more information.
MIT, for license details see: [LICENSE.md](https://github.com/benderjs/benderjs-coverage/blob/master/LICENSE.md).