diff options
author | ycjcl868 <45808948@qq.com> | 2021-06-01 04:56:57 +0300 |
---|---|---|
committer | ZiJian Liu <Lxxyxzj@gmail.com> | 2021-06-11 05:06:54 +0300 |
commit | d90a41f2989be347e3875cab33d0dd81123d3820 (patch) | |
tree | 5019b7a868c9cc9c13d86fdcd8ed7527f1c6e6ad /test | |
parent | ad27e0e9a187fea925dd0902aa229bc7c4bdb6c0 (diff) |
test: http outgoing _headers setter null
Co-authored-by: Qingyu Deng <i@ayase-lab.com>
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-http-outgoing-internal-headers.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/parallel/test-http-outgoing-internal-headers.js b/test/parallel/test-http-outgoing-internal-headers.js index 7bd97bcb530..17de5e7d075 100644 --- a/test/parallel/test-http-outgoing-internal-headers.js +++ b/test/parallel/test-http-outgoing-internal-headers.js @@ -31,3 +31,14 @@ common.expectWarning('DeprecationWarning', warn, 'DEP0066'); origin: ['Origin', 'localhost'] })); } + +{ + // Tests for _headers set method `null` + const outgoingMessage = new OutgoingMessage(); + outgoingMessage._headers = null; + + assert.strictEqual( + outgoingMessage[kOutHeaders], + null + ); +} |