From 6600bc603cf6772c4dffc4382f07cfcff358f3a8 Mon Sep 17 00:00:00 2001 From: brianc Date: Sun, 24 Oct 2010 23:18:23 -0500 Subject: [PATCH] better error message on timeout firing because event wasn't raised in assert.raises --- test/test-helper.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test-helper.js b/test/test-helper.js index a208d5c..fb18f4b 100644 --- a/test/test-helper.js +++ b/test/test-helper.js @@ -19,7 +19,9 @@ assert.same = function(actual, expected) { assert.raises = function(item, eventName, callback) { var called = false; var id = setTimeout(function() { - assert.ok(called, "Expected '" + eventName + "' to be called.") + test("Should have called " + eventName, function() { + assert.ok(called, "Expected '" + eventName + "' to be called.") + }); },1000); item.once(eventName, function() {