mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
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:
parent
f9675e104e
commit
4e713a3930
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user