Skip to content

Commit

Permalink
fix(config): Default outputDir to '.'
Browse files Browse the repository at this point in the history
Closes #54
  • Loading branch information
Janek Lasocki-Biczysko authored and dignifiedquire committed Aug 28, 2015
1 parent e4f7ebd commit 8fdfb73
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions index.js
Expand Up @@ -7,17 +7,19 @@ var JUnitReporter = function (baseReporterDecorator, config, logger, helper, for
var log = logger.create('reporter.junit')
var reporterConfig = config.junitReporter || {}
var pkgName = reporterConfig.suite || ''
var outputDir = reporterConfig.outputDir

if (!reporterConfig.outputDir) {
throw new Error('You must set an output directory for JUnitReporter via the outputDir config property')
}

var outputDir = helper.normalizeWinPath(path.resolve(config.basePath, reporterConfig.outputDir)) + path.sep
var suites
var pendingFileWritings = 0
var fileWritingFinished = function () {}
var allMessages = []

if (outputDir == null) {
outputDir = '.'
}

outputDir = helper.normalizeWinPath(path.resolve(config.basePath, outputDir)) + path.sep

baseReporterDecorator(this)

this.adapters = [function (msg) {
Expand Down

0 comments on commit 8fdfb73

Please sign in to comment.