test: replace forEach() with for-loop
PR-URL: https://github.com/nodejs/node/pull/50596 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
724a233026
commit
59ebf6d397
@ -32,10 +32,10 @@ if (process.argv[2] === 'child') {
|
||||
fs.readFile(file, common.mustCall((err, data) => {
|
||||
const traces = JSON.parse(data.toString()).traceEvents
|
||||
.filter((trace) => trace.cat !== '__metadata');
|
||||
traces.forEach((trace) => {
|
||||
for (const trace of traces) {
|
||||
assert.strictEqual(trace.pid, proc.pid);
|
||||
assert(names.includes(trace.name));
|
||||
});
|
||||
}
|
||||
}));
|
||||
}));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user