From cc7938d71ac51654abb8d28265964d0f53cd7fb3 Mon Sep 17 00:00:00 2001 From: Shikha Mehta Date: Fri, 22 Sep 2023 15:22:18 -0700 Subject: [PATCH] test: replace foreach with for in test-https-simple.js Fixes: https://github.com/nodejs/node/issues/50818 --- test/parallel/test-https-simple.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-https-simple.js b/test/parallel/test-https-simple.js index a65883162f60a2..b0562a1cd98174 100644 --- a/test/parallel/test-https-simple.js +++ b/test/parallel/test-https-simple.js @@ -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);