diff --git a/test/parallel/test-http-multiple-headers.js b/test/parallel/test-http-multiple-headers.js index 627efdd90cc1cc..f9c654ba2f8730 100644 --- a/test/parallel/test-http-multiple-headers.js +++ b/test/parallel/test-http-multiple-headers.js @@ -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(