Skip to content

Commit c99a09f

Browse files
ycjcl868richardlau
authored andcommitted
test: http outgoing _headers setter null
Co-authored-by: Qingyu Deng <[email protected]> PR-URL: #38881 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zijian Liu <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 41fcbad commit c99a09f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/parallel/test-http-outgoing-internal-headers.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,14 @@ common.expectWarning('DeprecationWarning', warn, 'DEP0066');
3131
origin: ['Origin', 'localhost']
3232
}));
3333
}
34+
35+
{
36+
// Tests for _headers set method `null`
37+
const outgoingMessage = new OutgoingMessage();
38+
outgoingMessage._headers = null;
39+
40+
assert.strictEqual(
41+
outgoingMessage[kOutHeaders],
42+
null
43+
);
44+
}

0 commit comments

Comments
 (0)