Skip to content

Commit

Permalink
throw error when this.callback with a return value
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed May 23, 2010
1 parent 70cf79e commit 8092bb3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/vows.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ function addVows(tests) {
process.nextTick(function (val) {
return function () { ctx.emitter.emit("success", val) };
}(topic));
} else if (typeof(topic) !== "undefined") {
throw new(Error)("topic must not return anything when using `this.callback`.");
}
topic = ctx.emitter;
}
Expand Down

0 comments on commit 8092bb3

Please sign in to comment.