Skip to content

Commit

Permalink
use 'end' as a completion event for test-suites
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed May 11, 2010
1 parent 68e147d commit 57fa14b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/vows.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ function addVows(tests) {
return match;
})(tests);

vows.remaining += remaining;

this.addListener("success", function () {
this.addListener("end", function () {
var topic, vow, env;

vows.remaining += remaining;

if (typeof(tests) === 'function') {
return tests.call(null);
} else {
Expand Down Expand Up @@ -376,7 +376,7 @@ vows.tell = function (subject) {
if (!vows.options.brief) {
puts('\n' + stylize(subject, 'underline') + '\n');
}
promise.emit("success");
promise.emit("end");
});
start = new(Date);

Expand Down

0 comments on commit 57fa14b

Please sign in to comment.