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 RafaelGSS committed Nov 1, 2024
1 parent 9dcca54 commit 2d19614
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 @@ -64,6 +64,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 2d19614

Please sign in to comment.