Skip to content

Commit 39b9cd1

Browse files
committed
fix http2 test
1 parent 0b75cf0 commit 39b9cd1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

test/http2.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ test('#3046 - GOAWAY Frame', async t => {
15271527
t.strictEqual(response.headers['x-custom-h2'], 'hello')
15281528
t.strictEqual(response.statusCode, 200)
15291529

1530-
t.rejects(response.body.text(), {
1530+
await t.rejects(response.body.text(), {
15311531
message: 'HTTP/2: "GOAWAY" frame received with code 0',
15321532
code: 'UND_ERR_SOCKET'
15331533
})
@@ -1748,9 +1748,11 @@ test('Should handle http2 stream timeout', async t => {
17481748
body: stream
17491749
})
17501750

1751-
t.rejects(res.body.text(), {
1751+
await t.rejects(res.body.text(), {
17521752
message: 'HTTP/2: "stream timeout after 50"'
17531753
})
1754+
1755+
await t.completed
17541756
})
17551757

17561758
test('Should handle http2 trailers', async t => {

0 commit comments

Comments
 (0)