Skip to content

Commit

Permalink
Merge pull request #407 from browniefed/addCoverageReportersConfigOption
Browse files Browse the repository at this point in the history
Add ability to configure the reporters that are passed to the coverage collector
  • Loading branch information
DmitrySoshnikov committed Jun 18, 2015
2 parents 0db8b16 + fcb3a28 commit 5a6b8aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/IstanbulTestReporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function (config, aggregatedResults) {
);

if (config.collectCoverage) {
reporter.addAll([ 'json', 'text', 'lcov', 'clover' ]);
reporter.addAll(config.coverageReporters);
reporter.write(collector, true, function () {
console.log('All reports generated');
});
Expand Down
3 changes: 2 additions & 1 deletion src/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var Q = require('q');
var DEFAULT_CONFIG_VALUES = {
cacheDirectory: path.resolve(__dirname, '..', '..', '.haste_cache'),
coverageCollector: require.resolve('../IstanbulCollector'),
coverageReporters: [ 'json', 'text', 'lcov', 'clover' ],
globals: {},
moduleFileExtensions: ['js', 'json'],
moduleLoader: require.resolve('../HasteModuleLoader/HasteModuleLoader'),
Expand Down Expand Up @@ -209,7 +210,7 @@ function normalizeConfig(config) {
return pattern.replace(/<rootDir>/g, config.rootDir);
});
break;

case 'coverageReporters':
case 'collectCoverage':
case 'coverageCollector':
case 'globals':
Expand Down

0 comments on commit 5a6b8aa

Please sign in to comment.