From 5d8f74c6fab5ec04c409e5edeef45b2bbf34c14b Mon Sep 17 00:00:00 2001 From: Niya Shiyas Date: Sat, 23 Sep 2023 13:48:39 +0530 Subject: [PATCH 1/2] test: replace forEach with for..of in test-http-perf_hooks.js --- test/parallel/test-http-perf_hooks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http-perf_hooks.js b/test/parallel/test-http-perf_hooks.js index de6ed0295a1152..7c6132f4632140 100644 --- a/test/parallel/test-http-perf_hooks.js +++ b/test/parallel/test-http-perf_hooks.js @@ -57,7 +57,7 @@ server.listen(0, common.mustCall(async () => { process.on('exit', () => { let numberOfHttpClients = 0; let numberOfHttpRequests = 0; - entries.forEach((entry) => { + for (const entry of entries) { assert.strictEqual(entry.entryType, 'http'); assert.strictEqual(typeof entry.startTime, 'number'); assert.strictEqual(typeof entry.duration, 'number'); @@ -72,7 +72,7 @@ process.on('exit', () => { assert.strictEqual(typeof entry.detail.res.statusCode, 'number'); assert.strictEqual(typeof entry.detail.res.statusMessage, 'string'); assert.strictEqual(typeof entry.detail.res.headers, 'object'); - }); + }; assert.strictEqual(numberOfHttpClients, 2); assert.strictEqual(numberOfHttpRequests, 2); }); From 6ab9f877cff04d5f1487c160f00a8d7b914ddea9 Mon Sep 17 00:00:00 2001 From: Niya Shiyas Date: Sun, 24 Sep 2023 15:22:20 +0530 Subject: [PATCH 2/2] test: replace forEach with for..of in test-http-perf_hooks.js --- test/parallel/test-http-perf_hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-http-perf_hooks.js b/test/parallel/test-http-perf_hooks.js index 7c6132f4632140..2ed1a736fa8841 100644 --- a/test/parallel/test-http-perf_hooks.js +++ b/test/parallel/test-http-perf_hooks.js @@ -72,7 +72,7 @@ process.on('exit', () => { assert.strictEqual(typeof entry.detail.res.statusCode, 'number'); assert.strictEqual(typeof entry.detail.res.statusMessage, 'string'); assert.strictEqual(typeof entry.detail.res.headers, 'object'); - }; + } assert.strictEqual(numberOfHttpClients, 2); assert.strictEqual(numberOfHttpRequests, 2); });