Skip to content

Commit

Permalink
fix http2 test (#3769)
Browse files Browse the repository at this point in the history
  • Loading branch information
KhafraDev authored Oct 25, 2024
1 parent 211cc27 commit c8dc113
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions test/http2.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,23 +334,15 @@ test(

after(() => server.close())
after(() => client.close())
t = tspl(t, { plan: 2 })
t = tspl(t, { plan: 1 })

try {
await client.request({
path: '/',
method: 'GET',
headers: {
'x-my-header': 'foo'
}
})
} catch (error) {
t.strictEqual(
error.message,
'Client network socket disconnected before secure TLS connection was established'
)
t.strictEqual(error.code, 'ECONNRESET')
}
await t.rejects(client.request({
path: '/',
method: 'GET',
headers: {
'x-my-header': 'foo'
}
}))
}
)

Expand Down

0 comments on commit c8dc113

Please sign in to comment.