Skip to content

Commit

Permalink
test: replace forEach() with for ... of in test-http2-single-headers.js
Browse files Browse the repository at this point in the history
PR-URL: #50606
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
spiritualized authored and UlisesGascon committed Dec 11, 2023
1 parent a541b78 commit 9043ba4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-http2-single-headers.js
Expand Up @@ -27,7 +27,7 @@ server.on('stream', common.mustNotCall());
server.listen(0, common.mustCall(() => {
const client = http2.connect(`http://localhost:${server.address().port}`);

singles.forEach((i) => {
for (const i of singles) {
assert.throws(
() => client.request({ [i]: 'abc', [i.toUpperCase()]: 'xyz' }),
{
Expand All @@ -45,7 +45,7 @@ server.listen(0, common.mustCall(() => {
message: `Header field "${i}" must only have a single value`
}
);
});
}

server.close();
client.close();
Expand Down

0 comments on commit 9043ba4

Please sign in to comment.