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>
This commit is contained in:
ycjcl868andQingyu Deng authored and ZiJian Liu committed 2021-06-11 10:06:54 +08:00
1 parent ad27e0e9a1
commit d90a41f298
1 file changed
+11
@@ -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
);
}