Skip to content

Commit

Permalink
#1144@patch: Fix test on Node 20.
Browse files Browse the repository at this point in the history
  • Loading branch information
IGx89 committed Oct 26, 2023
1 parent a35f7b2 commit f26b084
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,11 @@ async function itObservesUnhandledJavaScriptFetchRejections(): Promise<void> {
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.');
}
}
Expand Down

0 comments on commit f26b084

Please sign in to comment.