Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Configuration is optional. It should be put in a file at `config/coverage.js`.

- `excludes`: Defaults to `['*/mirage/**/*']`. An array of globs to exclude from instrumentation. Useful to exclude files from coverage statistics.

- `include`: Array of coverage json files to include in the final report generated by istanbul. These files are the output of a separate `istanbul` or `nyc` report, e.g. if you run server tests in a postBuild hook.

- `coverageFolder`: Defaults to `coverage`. A folder relative to the root of your project to store coverage results.

- `useBabelInstrumenter`: Defaults to `false`. Whether or not to use Babel instrumenter instead of default instrumenter. The Babel instrumenter is useful when you are using features of ESNext as it uses your Babel configuration defined in `ember-cli-build.js`.
Expand Down
6 changes: 6 additions & 0 deletions lib/attach-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ module.exports = function(app, options) {

collector.add(req.body);

if (_config.include) {
_config.include.forEach(function(file) {
collector.add(fs.readJSONSync(path.join(options.root, file)));
});
}

if (_config.reporters.indexOf('json-summary') === -1) {
_config.reporters.push('json-summary');
}
Expand Down