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: nodejs#50818
PR-URL: nodejs#49793
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Jithil P Ponnan <jithil@outlook.com>
  • Loading branch information
Shikha Mehta authored and Lei Shi committed Nov 27, 2023
1 parent f2d4b88 commit 4a3ce61
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 4a3ce61

Please sign in to comment.