Permalink
Browse files

fixes issue #50: infinite loops from exceptions in "end" events

  • Loading branch information...
1 parent 399a5ad commit c6b75429ad5ee156af4d708b62432c471a0db2e8 @substack substack committed with isaacs Jul 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/tap-test.js
View
@@ -46,7 +46,7 @@ Test.prototype.threw = function (ex) {
this.fail(ex.name + ": " + ex.message, { error: ex, thrown: true })
// may emit further failing tests if the plan is not completed
//console.error("end, because it threw")
- this.end()
+ if (!this._ended) this.end()
}
Test.prototype.comment = function (m) {

0 comments on commit c6b7542

Please sign in to comment.