From 8c15281d06c526579f2cc2aba34be2aaf7c3fa2f Mon Sep 17 00:00:00 2001 From: Niya Shiyas <98641481+niyashiyas@users.noreply.github.com> Date: Sat, 21 Oct 2023 10:29:05 +0530 Subject: [PATCH] test: replace forEach with for..of in test-http2-client-destroy.js PR-URL: https://github.com/nodejs/node/pull/49820 Reviewed-By: Luigi Pinca --- test/parallel/test-http2-client-destroy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http2-client-destroy.js b/test/parallel/test-http2-client-destroy.js index 6973cfa1df1e61..d7609fc33391ac 100644 --- a/test/parallel/test-http2-client-destroy.js +++ b/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(); })); - }); + } })); }