Skip to content

Commit

Permalink
Fix override default reporters (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
chernando authored and SBoudrias committed Aug 25, 2016
1 parent 5aefe19 commit 18ed282
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ plugin.writeReports = function (opts) {
opts = _.defaultsDeep(opts, {
coverageVariable: COVERAGE_VARIABLE,
dir: defaultDir,
reporters: [ 'lcov', 'json', 'text', 'text-summary' ],
reportOpts: {
dir: opts.dir || defaultDir
}
});
opts.reporters = opts.reporters || [ 'lcov', 'json', 'text', 'text-summary' ];

var reporters = opts.reporters.map(function(reporter) {
if (reporter.TYPE) Report.register(reporter);
Expand Down
1 change: 1 addition & 0 deletions test/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ describe('gulp-istanbul', function () {
process.stdout.write = out;
assert(fs.existsSync('./cov-foo'));
assert(!fs.existsSync('./cov-foo/lcov.info'));
assert(!fs.existsSync('./cov-foo/coverage-final.json'));
assert(fs.existsSync('./cov-foo/cobertura-coverage.xml'));
process.stdout.write = out;
done();
Expand Down

0 comments on commit 18ed282

Please sign in to comment.