Skip to content

Commit

Permalink
add regression test (nodejs#2376)
Browse files Browse the repository at this point in the history
  • Loading branch information
KhafraDev authored and crysmags committed Feb 27, 2024
1 parent 935584c commit e5eb82f
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 e5eb82f

Please sign in to comment.