From 15731b4b2fb5903ed392359038482ab9c0863dba Mon Sep 17 00:00:00 2001 From: Marco Mac Date: Sat, 18 Nov 2023 17:25:25 +0100 Subject: [PATCH] test: replace forEach test-http-server-multiheaders2 PR-URL: https://github.com/nodejs/node/pull/50794 Reviewed-By: James M Snell Reviewed-By: Marco Ippolito Reviewed-By: Luigi Pinca --- test/parallel/test-http-server-multiheaders2.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-http-server-multiheaders2.js b/test/parallel/test-http-server-multiheaders2.js index 1e19708557ef24..b20a2674d3ba16 100644 --- a/test/parallel/test-http-server-multiheaders2.js +++ b/test/parallel/test-http-server-multiheaders2.js @@ -70,15 +70,15 @@ const multipleForbidden = [ ]; const server = http.createServer(function(req, res) { - multipleForbidden.forEach(function(header) { + for (const header of multipleForbidden) { assert.strictEqual(req.headers[header.toLowerCase()], 'foo', `header parsed incorrectly: ${header}`); - }); - multipleAllowed.forEach(function(header) { + } + for (const header of multipleAllowed) { const sep = (header.toLowerCase() === 'cookie' ? '; ' : ', '); assert.strictEqual(req.headers[header.toLowerCase()], `foo${sep}bar`, `header parsed incorrectly: ${header}`); - }); + } res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('EOF');