Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Actual value of ignoreLoaks from configuration

fcrisci5b97387580c7
diff --git a/lib/mocha.js b/lib/mocha.js
index 8ce9e571..a66d0a21 100644
--- a/lib/mocha.js
+++ b/lib/mocha.js
@@ -209,12 +209,13 @@ Mocha.prototype.invert = function(){
/**
* Ignore global leaks.
*
+ * @param {Boolean} ignore
* @return {Mocha}
* @api public
*/
-Mocha.prototype.ignoreLeaks = function(){
- this.options.ignoreLeaks = true;
+Mocha.prototype.ignoreLeaks = function(ignore){
+ this.options.ignoreLeaks = !!ignore;
return this;
};