From c22d9bbe46ae52706dd204513d1aac4258bb49e1 Mon Sep 17 00:00:00 2001 From: Sergey Chernyshev Date: Thu, 25 Apr 2024 04:23:04 +0200 Subject: [PATCH] test: replace forEach with for..of in PR-URL: https://github.com/nodejs/node/pull/49820 Reviewed-By: Luigi Pinca --- graal-nodejs/test/parallel/test-http2-client-destroy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graal-nodejs/test/parallel/test-http2-client-destroy.js b/graal-nodejs/test/parallel/test-http2-client-destroy.js index 6973cfa1df1..d7609fc3339 100644 --- a/graal-nodejs/test/parallel/test-http2-client-destroy.js +++ b/graal-nodejs/test/parallel/test-http2-client-destroy.js @@ -22,7 +22,7 @@ const { getEventListeners } = require('events'); server.close(); }); - destroyCallbacks.forEach((destroyCallback) => { + for (const destroyCallback of destroyCallbacks) { const client = h2.connect(`http://localhost:${server.address().port}`); client.on('connect', common.mustCall(() => { const socket = client[kSocket]; @@ -45,7 +45,7 @@ const { getEventListeners } = require('events'); countdown.dec(); })); - }); + } })); }