Skip to content

Commit

Permalink
test: increase test coverage for http.OutgoingMessage.appendHeader()
Browse files Browse the repository at this point in the history
Signed-off-by: Juan José Arboleda <[email protected]>
PR-URL: #55467
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
  • Loading branch information
juanarbol authored and marco-ippolito committed Jan 22, 2025
1 parent cdf44e0 commit 18ec635
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/parallel/test-http-multiple-headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ const server = createServer(
res.write('BODY');
res.end();

assert.throws(() => res.appendHeader(), {
code: 'ERR_HTTP_HEADERS_SENT',
});

assert.deepStrictEqual(res.getHeader('X-Res-a'), ['AAA', 'BBB', 'CCC']);
assert.deepStrictEqual(res.getHeader('x-res-a'), ['AAA', 'BBB', 'CCC']);
assert.deepStrictEqual(
Expand Down

0 comments on commit 18ec635

Please sign in to comment.