From bc92be4ca97233b9264d7132921ac4f5861d9f8e Mon Sep 17 00:00:00 2001 From: spiritualized <12180217+spiritualized@users.noreply.github.com> Date: Sat, 11 Nov 2023 08:22:16 -0500 Subject: [PATCH] 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 Reviewed-By: James M Snell --- test/parallel/test-http2-single-headers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http2-single-headers.js b/test/parallel/test-http2-single-headers.js index c10623b9be7bf0..36ad8c3b419f4e 100644 --- a/test/parallel/test-http2-single-headers.js +++ b/test/parallel/test-http2-single-headers.js @@ -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();