Skip to content

Commit

Permalink
add additional http2 test with fetch (nodejs#2419)
Browse files Browse the repository at this point in the history
  • Loading branch information
KhafraDev authored and crysmags committed Feb 27, 2024
1 parent 2fa04a2 commit afc4681
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/fetch/http2.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ test('[Fetch] Simple GET with h2', async t => {
stream.end(expectedRequestBody)
})

t.plan(3)
t.plan(4)

server.listen()
await once(server, 'listening')
Expand Down Expand Up @@ -117,6 +117,9 @@ test('[Fetch] Simple GET with h2', async t => {
t.equal(responseBody, expectedRequestBody)
t.equal(response.headers.get('x-method'), 'GET')
t.equal(response.headers.get('x-custom-h2'), 'foo')

// See https://fetch.spec.whatwg.org/#concept-response-status-message
t.equal(response.statusText, '')
})

test('[Fetch] Should handle h2 request with body (string or buffer)', async t => {
Expand Down

0 comments on commit afc4681

Please sign in to comment.