Skip to content

Commit

Permalink
test: updated for each to for of in test file
Browse files Browse the repository at this point in the history
PR-URL: #50308
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
lyannel authored and targos committed May 12, 2024
1 parent 5ee6924 commit 4f96b00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-http-client-default-headers-exist.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ const server = http.createServer(common.mustCall((req, res) => {
`${req.method} was an unexpected method`);

const requestHeaders = Object.keys(req.headers);
requestHeaders.forEach((header) => {
for (const header of requestHeaders) {
assert.ok(
expectedHeaders[req.method].includes(header.toLowerCase()),
`${header} should not exist for method ${req.method}`
);
});
}

assert.strictEqual(
requestHeaders.length,
Expand Down

0 comments on commit 4f96b00

Please sign in to comment.