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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
chandrakhishma authored and lpinca committed Nov 2, 2023
1 parent 45f5c9b commit 791611a
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 791611a

Please sign in to comment.