From 3c7dde37f859045ba2129139fea69843cac64771 Mon Sep 17 00:00:00 2001 From: Steve Goode <52213009+SociableSteve@users.noreply.github.com> Date: Tue, 21 Nov 2023 12:53:22 +0000 Subject: [PATCH] test: replace forEach() with for ... of in test-tls-getprotocol.js PR-URL: https://github.com/nodejs/node/pull/50600 Reviewed-By: Luigi Pinca Reviewed-By: Marco Ippolito --- test/parallel/test-tls-getprotocol.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-tls-getprotocol.js b/test/parallel/test-tls-getprotocol.js index 7da2f60676d00e..571f400cea5746 100644 --- a/test/parallel/test-tls-getprotocol.js +++ b/test/parallel/test-tls-getprotocol.js @@ -35,7 +35,7 @@ const serverConfig = { const server = tls.createServer(serverConfig, common.mustCall(clientConfigs.length)) .listen(0, common.localhostIPv4, function() { let connected = 0; - clientConfigs.forEach(function(v) { + for (const v of clientConfigs) { tls.connect({ host: common.localhostIPv4, port: server.address().port, @@ -51,5 +51,5 @@ const server = tls.createServer(serverConfig, common.mustCall(clientConfigs.leng if (++connected === clientConfigs.length) server.close(); })); - }); + } });