diff --git a/packages/uncaught-exception-observer/test/UncaughtExceptionObserver.test.ts b/packages/uncaught-exception-observer/test/UncaughtExceptionObserver.test.ts index ad55315b9..8d5feaf2f 100644 --- a/packages/uncaught-exception-observer/test/UncaughtExceptionObserver.test.ts +++ b/packages/uncaught-exception-observer/test/UncaughtExceptionObserver.test.ts @@ -74,19 +74,11 @@ async function itObservesUnhandledJavaScriptFetchRejections(): Promise { throw new Error('Error event not dispatched.'); } - if ( - !errorEvent.error.message.startsWith( - 'Fetch to "https://localhost:3000/404.js" failed. Error: connect ECONNREFUSED' - ) - ) { + if (!errorEvent.error.message.startsWith('Fetch to "https://localhost:3000/404.js" failed.')) { throw new Error('Error message not correct.'); } - if ( - !errorEvent.message.startsWith( - 'Fetch to "https://localhost:3000/404.js" failed. Error: connect ECONNREFUSED' - ) - ) { + if (!errorEvent.message.startsWith('Fetch to "https://localhost:3000/404.js" failed.')) { throw new Error('Error message not correct.'); } }