From 4e713a3930b0758231ebaf6debbf30bb18eec920 Mon Sep 17 00:00:00 2001 From: Shikha Mehta Date: Thu, 23 Nov 2023 08:34:46 -0800 Subject: [PATCH] test: replace foreach with for in test-https-simple.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/nodejs/node/issues/50818 PR-URL: https://github.com/nodejs/node/pull/49793 Reviewed-By: Tobias Nießen Reviewed-By: Jithil P Ponnan --- 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);