diff --git a/tests/support/fixtures.ts b/tests/support/fixtures.ts index 4f10c639b..2de54c406 100644 --- a/tests/support/fixtures.ts +++ b/tests/support/fixtures.ts @@ -57,12 +57,14 @@ export const test = base.extend<{ log(msg.text(), browserLabel, outputLog); }); - page.on("pageerror", msg => { - expect( - false, - `Test failed because there was a console error in the app: ${msg}`, - ).toBeTruthy(); - }); + if (!process.env.CONTINUE_ON_ERRORS) { + page.on("pageerror", msg => { + expect( + false, + `Test failed because there was a console error in the app: ${msg}`, + ).toBeTruthy(); + }); + } if (!customAppConfig) { // Remember: `page.addInitScript()` is run in the browser which