fix: maxFailures reached follow-up (#26717)

This commit is contained in:
Max Schmitt 2023-08-26 08:10:42 +02:00 committed by GitHub
parent eb9ef64e7d
commit 1b30347ae5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -258,7 +258,9 @@ export class BaseReporter implements ReporterV2 {
} }
private _printMaxFailuresReached() { private _printMaxFailuresReached() {
if (this.config.maxFailures && this._failureCount < this.config.maxFailures) if (!this.config.maxFailures)
return;
if (this._failureCount < this.config.maxFailures)
return; return;
console.log(colors.yellow(`Testing stopped early after ${this.config.maxFailures} maximum allowed failures.`)); console.log(colors.yellow(`Testing stopped early after ${this.config.maxFailures} maximum allowed failures.`));
} }