Skip to content

Commit

Permalink
fix XUnit reporter output. Closes mochajs#2584
Browse files Browse the repository at this point in the history
  • Loading branch information
Volker Buzek authored and vobu committed Nov 17, 2016
1 parent 1d52fd3 commit 50af264
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/reporters/xunit.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var clearInterval = global.clearInterval;

exports = module.exports = XUnit;


/**
* Initialize a new `XUnit` reporter.
*
Expand All @@ -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');
}
Expand Down

0 comments on commit 50af264

Please sign in to comment.