Skip to content

Commit bc92be4

Browse files
spiritualizedtargos
authored andcommitted
test: replace forEach() with for ... of in test-http2-single-headers.js
PR-URL: #50606 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent e25c65e commit bc92be4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-http2-single-headers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ server.on('stream', common.mustNotCall());
2727
server.listen(0, common.mustCall(() => {
2828
const client = http2.connect(`http://localhost:${server.address().port}`);
2929

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

5050
server.close();
5151
client.close();

0 commit comments

Comments
 (0)