From fee8b2460384798c45127ce56062e4375406a189 Mon Sep 17 00:00:00 2001 From: Narcisa Codreanu <10314636+narcisacodreanu@users.noreply.github.com> Date: Fri, 6 Oct 2023 10:25:15 -0400 Subject: [PATCH] test: replace forEach() in test-net-perf_hooks with for of MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/49831 Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat Reviewed-By: Joe Sepi Reviewed-By: Tobias Nießen --- test/parallel/test-net-perf_hooks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-net-perf_hooks.js b/test/parallel/test-net-perf_hooks.js index 6b0d13aab27019..06b88ed7e7e7b9 100644 --- a/test/parallel/test-net-perf_hooks.js +++ b/test/parallel/test-net-perf_hooks.js @@ -49,12 +49,12 @@ obs.observe({ type: 'net' }); process.on('exit', () => { assert.strictEqual(entries.length, 1); - entries.forEach((entry) => { + for (const entry of entries) { assert.strictEqual(entry.name, 'connect'); assert.strictEqual(entry.entryType, 'net'); assert.strictEqual(typeof entry.startTime, 'number'); assert.strictEqual(typeof entry.duration, 'number'); assert.strictEqual(!!entry.detail.host, true); assert.strictEqual(!!entry.detail.port, true); - }); + } });