Skip to content

armgit / mocha

Public Imported from GitHub
0

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

fail

Tj Holowaychuk0fafe86068a9
diff --git a/lib/browser/events.js b/lib/browser/events.js
index bbac40bd..4d94ee10 100644
--- a/lib/browser/events.js
+++ b/lib/browser/events.js
@@ -160,7 +160,7 @@ EventEmitter.prototype.emit = function (name) {
return false;
}
- var args = [].slice.call(arguments);
+ var args = [].slice.call(arguments, 1);
if ('function' == typeof handler) {
handler.apply(this, args);
diff --git a/mocha.js b/mocha.js
index 944791ec..27b6f812 100644
--- a/mocha.js
+++ b/mocha.js
@@ -218,7 +218,7 @@ EventEmitter.prototype.emit = function (name) {
return false;
}
- var args = [].slice.call(arguments);
+ var args = [].slice.call(arguments, 1);
if ('function' == typeof handler) {
handler.apply(this, args);