Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs: Add note about swallowing of custom reporter errors (#37915)
Chris9959a4d4c238
diff --git a/docs/src/test-reporter-api/class-reporter.md b/docs/src/test-reporter-api/class-reporter.mdindex 44a148ba35..cd6cf1e643 100644--- a/docs/src/test-reporter-api/class-reporter.md+++ b/docs/src/test-reporter-api/class-reporter.md@@ -87,6 +87,11 @@ and [`method: Reporter.onError`] is called when something went wrong outside ofIf your custom reporter does not print anything to the terminal, implement [`method: Reporter.printsToStdio`] and return `false`. This way, Playwright will use one of the standard terminal reporters in addition to your custom reporter to enhance user experience.+**Reporter errors**++Playwright will swallow any errors thrown in your custom reporter methods. If you need to detect or fail on reporter+errors, you must wrap and handle them yourself.+**Merged report API notes**When merging multiple [`blob`](../test-reporters#blob-reporter) reports via [`merge-reports`](../test-sharding#merge-reports-cli) CLIdiff --git a/packages/playwright/types/testReporter.d.ts b/packages/playwright/types/testReporter.d.tsindex 3cadb05808..df4a40ba0d 100644--- a/packages/playwright/types/testReporter.d.ts+++ b/packages/playwright/types/testReporter.d.ts@@ -127,6 +127,11 @@ export interface FullResult {* `false`. This way, Playwright will use one of the standard terminal reporters in addition to your custom reporter* to enhance user experience.*+ * **Reporter errors**+ *+ * Playwright will swallow any errors thrown in your custom reporter methods. If you need to detect or fail on+ * reporter errors, you must wrap and handle them yourself.+ ** **Merged report API notes**** When merging multiple [`blob`](https://playwright.dev/docs/test-reporters#blob-reporter) reports via