Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Save timer references to avoid Sinon interfering in the browser build.

Jimmy Cuadraf39f3ca642ae
diff --git a/support/tail.js b/support/tail.js
index 34beb2f9..543c1b7e 100644
--- a/support/tail.js
+++ b/support/tail.js
@@ -37,6 +37,16 @@ process.on = function(e, fn){
// boot
;(function(){
+ /**
+ * Save timer references to avoid Sinon interfering (see GH-237).
+ */
+
+ var Date = global.Date,
+ setTimeout = global.setTimeout,
+ setInterval = global.setInterval,
+ clearTimeout = global.clearTimeout,
+ clearInterval = global.clearInterval;
+
/**
* Expose mocha.
*/