test: replace for each with for of

Signed-off-by: Sergio Calderon <sergioo.calderonn@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67122
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
Sergio Calderon authored and Antoine du Hamel committed 2026-11-11 17:20:24 +01:00
1 parent ed3bb858bd
commit cbffa1a8d4
1 file changed
+1 -1
+1 -1
View File
@@ -12,7 +12,7 @@ const server = net.createServer(common.mustCallAtLeast((c) => {
if (sockets.length === 2) {
assert.strictEqual(server.close(), server);
sockets.forEach((c) => c.resetAndDestroy());
for (const c of sockets) c.resetAndDestroy();
}
}));