Skip to content

armgit / mocha

Public Imported from GitHub
0

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

add Mocha#checkGlobals()

TJ Holowaychuke53fd518a2b9
diff --git a/lib/mocha.js b/lib/mocha.js
index 8085101a..217fe92e 100644
--- a/lib/mocha.js
+++ b/lib/mocha.js
@@ -203,6 +203,18 @@ Mocha.prototype.ignoreLeaks = function(){
return this;
};
+/**
+ * Enable global leak checking.
+ *
+ * @return {Mocha}
+ * @api public
+ */
+
+Mocha.prototype.checkGlobals = function(){
+ this.options.ignoreLeaks = false;
+ return this;
+};
+
/**
* Enable growl support.
*