Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Fixed "test end" event for uncaughtExceptions. Closes #61

Tj Holowaychuk355624380d94
diff --git a/lib/runner.js b/lib/runner.js
index 5a7f98f1..fdb3703e 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -305,6 +305,7 @@ Runner.prototype.run = function(){
// uncaught exception
process.on('uncaughtException', function(err){
self.fail(self.test, err);
+ self.emit('test end', self.test);
self.emit('end');
});