Skip to content

Commit 7f301e0

Browse files
Pupporichardlau
authored andcommitted
test: move to for of loop in test-http-hostname-typechecking.js
PR-URL: #50782 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
1 parent c823391 commit 7f301e0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/parallel/test-http-hostname-typechecking.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ vals.forEach((v) => {
3636
// These values are OK and should not throw synchronously.
3737
// Only testing for 'hostname' validation so ignore connection errors.
3838
const dontCare = () => {};
39-
['', undefined, null].forEach((v) => {
39+
const values = ['', undefined, null];
40+
for (const v of values) {
4041
http.request({ hostname: v }).on('error', dontCare).end();
4142
http.request({ host: v }).on('error', dontCare).end();
42-
});
43+
}

0 commit comments

Comments
 (0)