Skip to content

Commit

Permalink
rename Mocha#checkGlobals() to Mocha#checkLeaks()
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Sep 21, 2012
1 parent e53fd51 commit 6aa8fc9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ Mocha.prototype.ignoreLeaks = function(){
* @api public
*/

Mocha.prototype.checkGlobals = function(){
Mocha.prototype.checkLeaks = function(){
this.options.ignoreLeaks = false;
return this;
};
Expand Down
12 changes: 12 additions & 0 deletions mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,18 @@ Mocha.prototype.ignoreLeaks = function(){
return this;
};

/**
* Enable global leak checking.
*
* @return {Mocha}
* @api public
*/

Mocha.prototype.checkLeaks = function(){
this.options.ignoreLeaks = false;
return this;
};

/**
* Enable growl support.
*
Expand Down
2 changes: 1 addition & 1 deletion test/browser/large.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script src="large.js"></script>
<script>
onload = function(){
var runner = mocha.run();
mocha.ignoreLeaks().run();
};
</script>
</head>
Expand Down

0 comments on commit 6aa8fc9

Please sign in to comment.