Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix: maxFailures reached follow-up (#26717)

Max Schmitt1b30347ae512
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.`));
}