diff --git a/packages/playwright-test/src/reporters/base.ts b/packages/playwright-test/src/reporters/base.ts index 33e384f10c..a8c8688962 100644 --- a/packages/playwright-test/src/reporters/base.ts +++ b/packages/playwright-test/src/reporters/base.ts @@ -258,7 +258,9 @@ export class BaseReporter implements ReporterV2 { } private _printMaxFailuresReached() { - if (this.config.maxFailures && this._failureCount < this.config.maxFailures) + if (!this.config.maxFailures) + return; + if (this._failureCount < this.config.maxFailures) return; console.log(colors.yellow(`Testing stopped early after ${this.config.maxFailures} maximum allowed failures.`)); }