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:
ycjcl868 2021-06-01 09:56:57 +08:00 committed by ZiJian Liu
parent ad27e0e9a1
commit d90a41f298
1 changed files with 11 additions and 0 deletions

View File

@ -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
);
}