Skip to content

Commit

Permalink
add regression test (#2376)
Browse files Browse the repository at this point in the history
  • Loading branch information
KhafraDev authored Oct 26, 2023
1 parent 41c253d commit a3a437e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/fetch/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,17 @@ test('bundle sets constructor.name and .name properly', (t) => {

t.end()
})

test('regression test for https://github.com/nodejs/node/issues/50263', (t) => {
const request = new Request('https://a', {
headers: {
test: 'abc'
},
method: 'POST'
})

const request1 = new Request(request, { body: 'does not matter' })

t.equal(request1.headers.get('test'), 'abc')
t.end()
})

0 comments on commit a3a437e

Please sign in to comment.