From dac46788eea53ac5f044e50f09ca214984975615 Mon Sep 17 00:00:00 2001 From: Vincent Lemeunier Date: Mon, 9 Dec 2013 21:03:00 +0100 Subject: [PATCH] fix: use output dir per reporter Closes #42 --- lib/reporter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/reporter.js b/lib/reporter.js index b1520de..8f73e8a 100644 --- a/lib/reporter.js +++ b/lib/reporter.js @@ -116,7 +116,8 @@ var CoverageReporter = function(rootConfig, helper, logger) { var collector = collectors[browser.id]; if (collector) { pendingFileWritings++; - var out = path.resolve(outDir, browser.name); + var reporterOutDir = helper.isDefined(reporterConfig.dir) ? helper.normalizeWinPath(path.resolve(basePath, reporterConfig.dir)) : outDir, + out = path.resolve(reporterOutDir, browser.name); helper.mkdirIfNotExists(out, function() { log.debug('Writing coverage to %s', out); var options = helper.merge({}, reporterConfig, {