From 2205f47f4b6fc85fb17594be96db1341c4f6da5f Mon Sep 17 00:00:00 2001 From: Adriaan Thomas Date: Wed, 30 Sep 2015 19:17:44 +0200 Subject: [PATCH] fix(reporter): bug creating directory when outputFile specified (#67) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 3f272b9..0723629 100644 --- a/index.js +++ b/index.js @@ -58,7 +58,7 @@ var JUnitReporter = function (baseReporterDecorator, config, logger, helper, for } pendingFileWritings++ - helper.mkdirIfNotExists(outputDir, function () { + helper.mkdirIfNotExists(path.dirname(newOutputFile), function () { fs.writeFile(newOutputFile, xmlToOutput.end({pretty: true}), function (err) { if (err) { log.warn('Cannot write JUnit xml\n\t' + err.message)