Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: replace forEach() with for ... of in test-http2-single-headers.js
  • Loading branch information
spiritualized committed Nov 7, 2023
commit d24ed2f357118c687da6710f39828022675fcad3
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