Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Fix: html-runner crashing because of missing process.stdout shim

Sune Simonsen3186f53c4c97
diff --git a/support/browser-entry.js b/support/browser-entry.js
index 7655807f..c711ce3e 100644
--- a/support/browser-entry.js
+++ b/support/browser-entry.js
@@ -1,3 +1,9 @@
+/**
+ * Shim process.stdout.
+ */
+
+process.stdout = require('browser-stdout')();
+
var Mocha = require('../');
/**
@@ -140,12 +146,6 @@ mocha.run = function(fn){
});
};
-/**
- * Shim process.stdout.
- */
-
-process.stdout = require('browser-stdout')();
-
/**
* Expose the process shim.
* https://github.com/mochajs/mocha/pull/916