e2e-test: removed outdated unhandled rejection handler that would ignore errors
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user