test: replace foreach with for in test-https-simple.js

Fixes: https://github.com/nodejs/node/issues/50818
PR-URL: https://github.com/nodejs/node/pull/49793
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Jithil P Ponnan <jithil@outlook.com>
This commit is contained in:
Shikha Mehta authored and GitHub committed 2023-11-23 16:34:46 +00:00
1 parent f9675e104e
commit 4e713a3930
1 file changed
+2 -2
+2 -2
View File
@@ -45,13 +45,13 @@ const serverCallback = common.mustCall(function(req, res) {
});
const invalid_options = [ 'foo', 42, true, [] ];
invalid_options.forEach((option) => {
for (const option of invalid_options) {
assert.throws(() => {
new https.Server(option);
}, {
code: 'ERR_INVALID_ARG_TYPE',
});
});
}
const server = https.createServer(options, serverCallback);