Skip to content

Commit

Permalink
fix: create browser directory if not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
killercentury committed Jul 22, 2015
1 parent 4fb24f0 commit fe14a8d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ var JUnitReporter = function (baseReporterDecorator, config, logger, helper, for
}

var writeXmlForBrowser = function (browser) {
var outputFile = path.join(outputDir, browser.name.replace(/ /g, '_'))
var outputBrowserPath = path.join(outputDir, browser.name.replace(/ /g, '_'))
var xmlToOutput = suites[browser.id]
var outputFile

if (outputFileName) {
outputFile = path.join(outputFile, outputFileName)
outputDir = outputBrowserPath
outputFile = path.join(outputBrowserPath, outputFileName)
} else {
outputFile += '.xml'
outputFile = outputBrowserPath + '.xml'
}

pendingFileWritings++
Expand Down

0 comments on commit fe14a8d

Please sign in to comment.