Skip to content

Commit

Permalink
ported #2387 (#2393)
Browse files Browse the repository at this point in the history
Co-authored-by: Mykhailo Bodnarchuk <mykhailo.bodnarchuk@Mykhailos-MacBook-Pro.local>
  • Loading branch information
DavertMik and Mykhailo Bodnarchuk committed May 14, 2020
1 parent 28813b3 commit 5f3572e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/workers.js
Expand Up @@ -171,6 +171,7 @@ class Workers extends EventEmitter {
passes: 0,
failures: 0,
tests: 0,
pending: 0,
};
this.testGroups = [];

Expand Down Expand Up @@ -319,6 +320,10 @@ class Workers extends EventEmitter {
this._updateFinishedTests(repackTest(message.data));
this.emit(event.test.passed, repackTest(message.data));
break;
case event.test.skipped:
this._updateFinishedTests(repackTest(message.data));
this.emit(event.test.skipped, repackTest(message.data));
break;
case event.test.finished: this.emit(event.test.finished, repackTest(message.data)); break;
case event.all.after: this._appendStats(message.data); break;
}
Expand All @@ -345,6 +350,7 @@ class Workers extends EventEmitter {
this.stats.passes += newStats.passes;
this.stats.failures += newStats.failures;
this.stats.tests += newStats.tests;
this.stats.pending += newStats.pending;
}

_updateFinishedTests(test) {
Expand All @@ -361,7 +367,7 @@ class Workers extends EventEmitter {
this.stats.duration = this.stats.end - this.stats.start;
output.print();
if (this.stats.tests === 0 || (this.stats.passes && !this.errors.length)) {
output.result(this.stats.passes, this.stats.failures, 0, `${this.stats.duration || 0 / 1000}s`);
output.result(this.stats.passes, this.stats.failures, this.stats.pending, `${this.stats.duration || 0 / 1000}s`);
}
if (this.stats.failures) {
output.print();
Expand Down

0 comments on commit 5f3572e

Please sign in to comment.