From 50af264bdab51698d1a0f6ea554bdf5a74d46b7d Mon Sep 17 00:00:00 2001 From: Volker Buzek Date: Thu, 17 Nov 2016 09:20:18 +0100 Subject: [PATCH] fix XUnit reporter output. Closes #2584 --- lib/reporters/xunit.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/reporters/xunit.js b/lib/reporters/xunit.js index 08f7b4cac3..b46035ed94 100644 --- a/lib/reporters/xunit.js +++ b/lib/reporters/xunit.js @@ -30,6 +30,7 @@ var clearInterval = global.clearInterval; exports = module.exports = XUnit; + /** * Initialize a new `XUnit` reporter. * @@ -43,7 +44,7 @@ function XUnit (runner, options) { var tests = []; var self = this; - if (options.reporterOptions && options.reporterOptions.output) { + if (options && options.reporterOptions && options.reporterOptions.output) { if (!fs.createWriteStream) { throw new Error('file output not supported in browser'); }