Skip to content

Commit

Permalink
test: replace forEach with for..of in test-http-perf_hooks.js
Browse files Browse the repository at this point in the history
PR-URL: nodejs#49818
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
niyashiyas authored and alexfernandez committed Nov 1, 2023
1 parent dd23de0 commit 0b76ebc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-http-perf_hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ server.listen(0, common.mustCall(async () => {
process.on('exit', () => {
let numberOfHttpClients = 0;
let numberOfHttpRequests = 0;
entries.forEach((entry) => {
for (const entry of entries) {
assert.strictEqual(entry.entryType, 'http');
assert.strictEqual(typeof entry.startTime, 'number');
assert.strictEqual(typeof entry.duration, 'number');
Expand All @@ -72,7 +72,7 @@ process.on('exit', () => {
assert.strictEqual(typeof entry.detail.res.statusCode, 'number');
assert.strictEqual(typeof entry.detail.res.statusMessage, 'string');
assert.strictEqual(typeof entry.detail.res.headers, 'object');
});
}
assert.strictEqual(numberOfHttpClients, 2);
assert.strictEqual(numberOfHttpRequests, 2);
});

0 comments on commit 0b76ebc

Please sign in to comment.