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 UlisesGascon committed Dec 11, 2023
1 parent 9dc63c5 commit f885dfe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-trace-events-http.js
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 f885dfe

Please sign in to comment.