Skip to content

Commit a3a437e

Browse files
authored
add regression test (#2376)
refs: nodejs/node#50263 (comment)
1 parent 41c253d commit a3a437e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/fetch/bundle.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,17 @@ test('bundle sets constructor.name and .name properly', (t) => {
2525

2626
t.end()
2727
})
28+
29+
test('regression test for https://github.com/nodejs/node/issues/50263', (t) => {
30+
const request = new Request('https://a', {
31+
headers: {
32+
test: 'abc'
33+
},
34+
method: 'POST'
35+
})
36+
37+
const request1 = new Request(request, { body: 'does not matter' })
38+
39+
t.equal(request1.headers.get('test'), 'abc')
40+
t.end()
41+
})

0 commit comments

Comments
 (0)