From c043396c27ce869185a06d287065213be628cb48 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 17 Jan 2024 21:27:08 +0100 Subject: [PATCH] e2e-test: removed outdated unhandled rejection handler that would ignore errors Signed-off-by: Patrik Oldsberg --- packages/e2e-test/src/index.ts | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/packages/e2e-test/src/index.ts b/packages/e2e-test/src/index.ts index 92adc24b1e..f3c63ae175 100644 --- a/packages/e2e-test/src/index.ts +++ b/packages/e2e-test/src/index.ts @@ -36,23 +36,4 @@ async function main(argv: string[]) { program.parse(argv); } -process.on('unhandledRejection', (rejection: unknown) => { - // Try to avoid exiting if the unhandled error is coming from jsdom, i.e. zombie. - // Those are typically errors on the page that should be benign, at least in the - // context of this test. We have other ways of asserting that the page is being - // rendered correctly. - if ( - rejection instanceof Error && - rejection?.stack?.includes('node_modules/jsdom/lib') - ) { - console.log(`Ignored error inside jsdom, ${rejection?.stack ?? rejection}`); - } else { - if (rejection instanceof Error) { - exitWithError(rejection); - } else { - exitWithError(new Error(`Unknown rejection: '${rejection}'`)); - } - } -}); - main(process.argv).catch(exitWithError);