From f885dfe5e351e9367d89d6ee62d0b4b2e35d4e03 Mon Sep 17 00:00:00 2001 From: Chand Date: Fri, 22 Sep 2023 18:56:57 -0400 Subject: [PATCH] test: replace forEach() with for...of in test-trace-events-http MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/49795 Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca --- test/parallel/test-trace-events-http.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-trace-events-http.js b/test/parallel/test-trace-events-http.js index bcdc897e2ff136..07a6b28fa5b273 100644 --- a/test/parallel/test-trace-events-http.js +++ b/test/parallel/test-trace-events-http.js @@ -31,12 +31,12 @@ proc.once('exit', common.mustCall(() => { const traces = JSON.parse(data.toString()).traceEvents; assert(traces.length > 0); let count = 0; - traces.forEach((trace) => { + for (const trace of traces) { if (trace.cat === 'node,node.http' && ['http.server.request', 'http.client.request'].includes(trace.name)) { count++; } - }); + } // Two begin, two end assert.strictEqual(count, 4); }));