From 622cf681ad6bda60b013d3e291e2c648e35b94e8 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);