Skip to content

Commit

Permalink
Fixed: clear timeout on uncaught exceptions. Closes mochajs#131
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Dec 9, 2011
1 parent 2c320e1 commit 92cb0c1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/runner.js
Expand Up @@ -391,6 +391,7 @@ Runner.prototype.run = function(fn){
// uncaught exception // uncaught exception
function uncaught(err){ function uncaught(err){
debug('uncaught exception'); debug('uncaught exception');
self.currentRunnable.clearTimeout();
self.fail(self.currentRunnable, err); self.fail(self.currentRunnable, err);
self.emit('test end', self.test); self.emit('test end', self.test);
self.emit('end'); self.emit('end');
Expand Down

0 comments on commit 92cb0c1

Please sign in to comment.