Skip to content

Commit f7f8957

Browse files
committed
fix: reporter allow using a externally provided source cachere for reporters
change `coverageReporter` options to allow for specifying `sourceStore`, this is an instance of `istanbul.Store` to look up source files. This allows using external coverage collectors like `browserify-istanbul` for instrumenting code.
1 parent 8c3f2a8 commit f7f8957

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/reporter.js

100644100755
+3-2
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,12 @@ var CoverageReporter = function(rootConfig, helper, logger) {
134134
reporterConfig.dir || config.dir,
135135
reporterConfig.subdir || config.subdir)));
136136

137-
var options = helper.merge({}, reporterConfig, {
138-
dir : outputDir,
137+
var options = helper.merge({
139138
sourceStore : new SourceCacheStore({
140139
sourceCache: sourceCache
141140
})
141+
}, reporterConfig, {
142+
dir : outputDir
142143
});
143144
var reporter = istanbul.Report.create(reporterConfig.type || 'html', options);
144145

0 commit comments

Comments
 (0)