Skip to content

Commit

Permalink
test: replace foreach with for in test-https-simple.js
Browse files Browse the repository at this point in the history
Fixes: #50818
PR-URL: #49793
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Jithil P Ponnan <jithil@outlook.com>
  • Loading branch information
Shikha Mehta authored and RafaelGSS committed Nov 29, 2023
1 parent bc31375 commit 9d76de1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-https-simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9d76de1

Please sign in to comment.