Skip to content

Commit

Permalink
test: replace forEach with for..of in test-http-url
Browse files Browse the repository at this point in the history
PR-URL: #49840
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
niyashiyas authored and targos committed Nov 11, 2023
1 parent d164e53 commit 81886c6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ const invalidUrls = [
'f://some.host/path',
];

invalidUrls.forEach((invalid) => {
for (const invalid of invalidUrls) {
assert.throws(
() => { http.request(url.parse(invalid)); },
{
code: 'ERR_INVALID_PROTOCOL',
name: 'TypeError'
}
);
});
}

0 comments on commit 81886c6

Please sign in to comment.