We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9def14 commit 8a80302Copy full SHA for 8a80302
lib/results.js
@@ -53,10 +53,7 @@ Results.prototype.push = function (t, parentT) {
53
t.on('test', function (st) {
54
subtests ++;
55
st.on('end', function () {
56
- self.running --;
57
subtests --;
58
- if (subtests === 0 && !plan) t.emit('end');
59
- nextTick(function () { onend.call(t) });
60
});
61
self.push(st, t);
62
if (subtests === 1) nextTick(function () { st.run() });
@@ -80,10 +77,10 @@ Results.prototype.push = function (t, parentT) {
80
77
if (subtests !== 0) return;
81
78
self.running --;
82
79
83
- if (!self.running && self.tests.length === 0) {
+ if (self.running === 0 && self.tests.length === 0) {
84
self.close();
85
}
86
- else if (!self.running) {
+ else if (self.running === 0) {
87
var t = self.tests.shift();
88
t.run();
89
0 commit comments