Skip to content

Commit

Permalink
test: http outgoing _headers setter null
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ycjcl868 authored and richardlau committed Jul 19, 2021
1 parent a74fc37 commit 2e0d6ed
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/parallel/test-http-outgoing-internal-headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}

0 comments on commit 2e0d6ed

Please sign in to comment.