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 <soyjuanarbol@gmail.com>
PR-URL: #55467
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
  • Loading branch information
juanarbol authored Oct 25, 2024
1 parent 2505e21 commit 1ba8fbe
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 1ba8fbe

Please sign in to comment.