From 24492476a7943c2542f4cbdde7e21e56ec90181a Mon Sep 17 00:00:00 2001 From: Niya Shiyas Date: Sun, 24 Sep 2023 15:42:12 +0530 Subject: [PATCH] test: replace forEach with for..of in test-http-url PR-URL: https://github.com/nodejs/node/pull/49840 Reviewed-By: Luigi Pinca --- .../test-http-url.parse-only-support-http-https-protocol.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http-url.parse-only-support-http-https-protocol.js b/test/parallel/test-http-url.parse-only-support-http-https-protocol.js index 9b2a575ba7b1d7..3f6633075c6aec 100644 --- a/test/parallel/test-http-url.parse-only-support-http-https-protocol.js +++ b/test/parallel/test-http-url.parse-only-support-http-https-protocol.js @@ -34,7 +34,7 @@ const invalidUrls = [ 'f://some.host/path', ]; -invalidUrls.forEach((invalid) => { +for (const invalid of invalidUrls) { assert.throws( () => { http.request(url.parse(invalid)); }, { @@ -42,4 +42,4 @@ invalidUrls.forEach((invalid) => { name: 'TypeError' } ); -}); +}