Skip to content

armgit / mocha

Public Imported from GitHub
0

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

run onload for now

Tj Holowaychuk061a838cb5db
diff --git a/mocha.js b/mocha.js
index 79d2d2cb..daefd95b 100644
--- a/mocha.js
+++ b/mocha.js
@@ -2009,7 +2009,6 @@ process = {};
process.nextTick = function(fn){ setTimeout(fn, 0); };
process.on = function(){};
process.exit = function(status){};
-
process.stdout = {};
global = this;
@@ -2023,7 +2022,7 @@ global = this;
mocha.interfaces.bdd(suite);
suite.emit('pre-require', global);
- setTimeout(run, 0);
+ global.onload = run; // TODO: remove
function run() {
suite.emit('run');
diff --git a/support/tail.js b/support/tail.js
index e5edc7e6..1f07fcfe 100644
--- a/support/tail.js
+++ b/support/tail.js
@@ -26,7 +26,7 @@ global = this;
mocha.interfaces.bdd(suite);
suite.emit('pre-require', global);
- setTimeout(run, 0);
+ global.onload = run; // TODO: remove
function run() {
suite.emit('run');