Skip to content

Commit

Permalink
No callback is equivalent to skipping.
Browse files Browse the repository at this point in the history
  • Loading branch information
braddunbar authored and James Halliday committed Feb 21, 2014
1 parent 61df434 commit 9f7a2d0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,12 @@ function Test (name_, opts_, cb_) {
}

Test.prototype.run = function () {
if (this._skip) {
if (!this._cb || this._skip) {
return this.end();
}
this.emit('prerun');
try {
if (this._cb) this._cb(this);
else this.end();
this._cb(this);
}
catch (err) {
this.error(err);
Expand Down

0 comments on commit 9f7a2d0

Please sign in to comment.