☕️ Classic, reliable, trusted test framework for Node.js and the browser
Use Mocha.utils.indexOf (fix #1081)
Travis Jeffery4b47867f4f68
diff --git a/mocha.js b/mocha.jsindex bd2bc9a9..43acbcce 100644--- a/mocha.js+++ b/mocha.js@@ -5607,7 +5607,7 @@ var uncaughtExceptionHandlers = [];process.removeListener = function(e, fn){if ('uncaughtException' == e) {global.onerror = function() {};- var i = uncaughtExceptionHandlers.indexOf(fn);+ var i = Mocha.utils.indexOf(uncaughtExceptionHandlers, fn);if (i != -1) { uncaughtExceptionHandlers.splice(i, 1); }}};diff --git a/support/tail.js b/support/tail.jsindex 05dd1525..7f757e8b 100644--- a/support/tail.js+++ b/support/tail.js@@ -33,7 +33,7 @@ var uncaughtExceptionHandlers = [];process.removeListener = function(e, fn){if ('uncaughtException' == e) {global.onerror = function() {};- var i = uncaughtExceptionHandlers.indexOf(fn);+ var i = Mocha.utils.indexOf(uncaughtExceptionHandlers, fn);if (i != -1) { uncaughtExceptionHandlers.splice(i, 1); }}};