Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Fixed reporting of uncaught exceptions. Closes #183

TJ Holowaychuk800840ec0745
diff --git a/lib/runner.js b/lib/runner.js
index 40535e2a..10978b89 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -305,8 +305,9 @@ Runner.prototype.runTests = function(suite, fn){
}
// execute test and hook(s)
- self.emit('test', self.test = self.currentRunnable = test);
+ self.emit('test', self.test = test);
self.hookDown('beforeEach', function(){
+ self.currentRunnable = test;
self.runTest(function(err){
if (err) {
self.fail(test, err);