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 ruyadorno committed Nov 27, 2024
1 parent acc6806 commit 2194eb4
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 2194eb4

Please sign in to comment.