Skip to content

Commit

Permalink
test: replace forEach() with for...of in test-trace-events-http
Browse files Browse the repository at this point in the history
PR-URL: #49795
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
chandrakhishma authored and targos committed Nov 11, 2023
1 parent 4c02ec6 commit 28b866c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-trace-events-http.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}));
Expand Down

0 comments on commit 28b866c

Please sign in to comment.