☕️ Classic, reliable, trusted test framework for Node.js and the browser
fix lint errors
Ian W. Remmeld09c035f7e63
diff --git a/lib/reporters/xunit.js b/lib/reporters/xunit.jsindex cf3411e6..7c16302c 100644--- a/lib/reporters/xunit.js+++ b/lib/reporters/xunit.js@@ -8,6 +8,7 @@ var inherits = utils.inherits;var fs = require('fs');var escape = utils.escape;var mkdirp = require('mkdirp');+var path = require('path');/*** Save timer references to avoid Sinon interfering (see GH-237).@@ -41,11 +42,11 @@ function XUnit(runner, options) {var self = this;if (options.reporterOptions && options.reporterOptions.output) {- if (! fs.createWriteStream) {- throw new Error('file output not supported in browser');- }- mkdirp.sync(path.dirname(options.reporterOptions.output));- self.fileStream = fs.createWriteStream(options.reporterOptions.output);+ if (!fs.createWriteStream) {+ throw new Error('file output not supported in browser');+ }+ mkdirp.sync(path.dirname(options.reporterOptions.output));+ self.fileStream = fs.createWriteStream(options.reporterOptions.output);}runner.on('pending', function(test) {