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: #49818
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
niyashiyas authored and targos committed Nov 11, 2023
1 parent 379a725 commit 72626f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-http-perf_hooks.js
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 72626f9

Please sign in to comment.