☕️ Classic, reliable, trusted test framework for Node.js and the browser
[Fix] Exclude not own properties when looping on options
Anis Safine8a607872c1ea
diff --git a/mocha.js b/mocha.jsold mode 100644new mode 100755index c6b62d37..cffddcbc--- a/mocha.js+++ b/mocha.js@@ -6518,7 +6518,11 @@ mocha.ui = function(ui){mocha.setup = function(opts){if ('string' == typeof opts) opts = { ui: opts };- for (var opt in opts) this[opt](opts[opt]);+ for (var opt in opts) {+ if (opts.hasOwnProperty(opt)) {+ this[opt](opts[opt]);+ }+ }return this;};