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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
spiritualized authored and targos committed Nov 14, 2023
1 parent e25c65e commit bc92be4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-http2-single-headers.js
Original file line number Diff line number Diff line change
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 bc92be4

Please sign in to comment.