Skip to content

Commit e82111f

Browse files
ycjcl868targos
authored andcommitted
test: http outgoing _headers setter null
Co-authored-by: Qingyu Deng <i@ayase-lab.com> PR-URL: #38881 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent f903ad8 commit e82111f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

+11
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)