Skip to content

Commit

Permalink
passing the skip test
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed May 2, 2013
1 parent 4fbabba commit 876930e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/results.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,15 @@ Results.prototype.push = function (t, parentT) {
if (res.ok) self.pass ++
else self.fail ++
});
t.once('end', onend);

function onend () {
t.once('end', function () {
if (t._skip) {
var nt = self.tests.shift();
if (nt) nt.run();
else self.close();
return;
}

self.running --;
if (subtests !== 0) return;

Expand All @@ -104,7 +110,7 @@ Results.prototype.push = function (t, parentT) {
else if (self.running === 0) {
self.close();
}
}
});
};

Results.prototype.close = function () {
Expand Down

0 comments on commit 876930e

Please sign in to comment.