Skip to content

Commit

Permalink
test: replace forEach() in test-net-perf_hooks with for of
Browse files Browse the repository at this point in the history
PR-URL: nodejs#49831
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Joe Sepi <sepi@joesepi.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
narcisacodreanu authored and alexfernandez committed Nov 1, 2023
1 parent 37697e0 commit 088e169
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-net-perf_hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ obs.observe({ type: 'net' });

process.on('exit', () => {
assert.strictEqual(entries.length, 1);
entries.forEach((entry) => {
for (const entry of entries) {
assert.strictEqual(entry.name, 'connect');
assert.strictEqual(entry.entryType, 'net');
assert.strictEqual(typeof entry.startTime, 'number');
assert.strictEqual(typeof entry.duration, 'number');
assert.strictEqual(!!entry.detail.host, true);
assert.strictEqual(!!entry.detail.port, true);
});
}
});

0 comments on commit 088e169

Please sign in to comment.