Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

fix XUnit reporter output. Closes #2584

Volker Buzekedde033baa1b
diff --git a/lib/reporters/xunit.js b/lib/reporters/xunit.js
index 08f7b4ca..ecfc8b23 100644
--- a/lib/reporters/xunit.js
+++ b/lib/reporters/xunit.js
@@ -43,7 +43,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');
}