From a461cb7840d3baca7c72f95ee732dde1f54af9bf Mon Sep 17 00:00:00 2001 From: Sergey Chernyshev Date: Thu, 25 Apr 2024 04:23:05 +0200 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 --- .../parallel/test-http2-server-shutdown-options-errors.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graal-nodejs/test/parallel/test-http2-server-shutdown-options-errors.js b/graal-nodejs/test/parallel/test-http2-server-shutdown-options-errors.js index e6a69b54627..5a2ca62a6c8 100644 --- a/graal-nodejs/test/parallel/test-http2-server-shutdown-options-errors.js +++ b/graal-nodejs/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(); }));