From 28b866c591d937a7b061a343ec7a94b4ae5f1c12 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); }));