mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
test: replace forEach() with for ... of in test-http2-single-headers.js
PR-URL: https://github.com/nodejs/node/pull/50606 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
9223820d0e
commit
2c4bb21b8c
@ -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' }),
|
||||
{
|
||||
@ -45,7 +45,7 @@ server.listen(0, common.mustCall(() => {
|
||||
message: `Header field "${i}" must only have a single value`
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
server.close();
|
||||
client.close();
|
||||
|
Loading…
Reference in New Issue
Block a user