From 4f96b0030773bf11441d444cb9ca6a23b4b63940 Mon Sep 17 00:00:00 2001 From: lyannel Date: Sat, 11 May 2024 11:48:23 -0700 Subject: [PATCH] test: updated for each to for of in test file PR-URL: https://github.com/nodejs/node/pull/50308 Reviewed-By: Yongsheng Zhang Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- test/parallel/test-http-client-default-headers-exist.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http-client-default-headers-exist.js b/test/parallel/test-http-client-default-headers-exist.js index 4c49bae8009cd5..cff2370a3124ca 100644 --- a/test/parallel/test-http-client-default-headers-exist.js +++ b/test/parallel/test-http-client-default-headers-exist.js @@ -45,12 +45,12 @@ const server = http.createServer(common.mustCall((req, res) => { `${req.method} was an unexpected method`); const requestHeaders = Object.keys(req.headers); - requestHeaders.forEach((header) => { + for (const header of requestHeaders) { assert.ok( expectedHeaders[req.method].includes(header.toLowerCase()), `${header} should not exist for method ${req.method}` ); - }); + } assert.strictEqual( requestHeaders.length,