Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Fixed global leak detection

Tj Holowaychuka97c5a3cc631
diff --git a/lib/runner.js b/lib/runner.js
index 81304be7..a7b88154 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -35,7 +35,7 @@ function Runner(suite) {
this.suite = suite;
this.total = suite.total();
this.globals = Object.keys(global).concat(['errno']);
- this.on('test end', function(){ self.checkGlobals(); });
+ this.on('test end', function(test){ self.checkGlobals(test); });
this.grep(/.*/);
}