Skip to content

Commit c8dc113

Browse files
authored
fix http2 test (#3769)
1 parent 211cc27 commit c8dc113

1 file changed

Lines changed: 8 additions & 16 deletions

File tree

test/http2.js

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -334,23 +334,15 @@ test(
334334

335335
after(() => server.close())
336336
after(() => client.close())
337-
t = tspl(t, { plan: 2 })
337+
t = tspl(t, { plan: 1 })
338338

339-
try {
340-
await client.request({
341-
path: '/',
342-
method: 'GET',
343-
headers: {
344-
'x-my-header': 'foo'
345-
}
346-
})
347-
} catch (error) {
348-
t.strictEqual(
349-
error.message,
350-
'Client network socket disconnected before secure TLS connection was established'
351-
)
352-
t.strictEqual(error.code, 'ECONNRESET')
353-
}
339+
await t.rejects(client.request({
340+
path: '/',
341+
method: 'GET',
342+
headers: {
343+
'x-my-header': 'foo'
344+
}
345+
}))
354346
}
355347
)
356348

0 commit comments

Comments
 (0)