From d5b97ae15d2e51e6743f6ec0c6f3183cd6e9ca60 Mon Sep 17 00:00:00 2001 From: Niya Shiyas Date: Sat, 23 Sep 2023 13:53:37 +0530 Subject: [PATCH] test: replace forEach with for..of in test-http2-server PR-URL: https://github.com/nodejs/node/pull/49819 Reviewed-By: Luigi Pinca --- test/parallel/test-http2-server-shutdown-options-errors.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http2-server-shutdown-options-errors.js b/test/parallel/test-http2-server-shutdown-options-errors.js index e6a69b54627e00..5a2ca62a6c8e31 100644 --- a/test/parallel/test-http2-server-shutdown-options-errors.js +++ b/test/parallel/test-http2-server-shutdown-options-errors.js @@ -19,7 +19,7 @@ const types = [ server.on('stream', common.mustCall((stream) => { const session = stream.session; - types.forEach((input) => { + for (const input of types) { const received = common.invalidArgTypeHelper(input); assert.throws( () => session.goaway(input), @@ -48,7 +48,7 @@ server.on('stream', common.mustCall((stream) => { `TypedArray, or DataView.${received}` } ); - }); + } stream.session.destroy(); }));