Skip to content

Commit aaf710f

Browse files
mmacheraRafaelGSS
authored andcommitted
test: replace forEach test-http-server-multiheaders2
PR-URL: #50794 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 941aedc commit aaf710f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/parallel/test-http-server-multiheaders2.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ const multipleForbidden = [
7070
];
7171

7272
const server = http.createServer(function(req, res) {
73-
multipleForbidden.forEach(function(header) {
73+
for (const header of multipleForbidden) {
7474
assert.strictEqual(req.headers[header.toLowerCase()], 'foo',
7575
`header parsed incorrectly: ${header}`);
76-
});
77-
multipleAllowed.forEach(function(header) {
76+
}
77+
for (const header of multipleAllowed) {
7878
const sep = (header.toLowerCase() === 'cookie' ? '; ' : ', ');
7979
assert.strictEqual(req.headers[header.toLowerCase()], `foo${sep}bar`,
8080
`header parsed incorrectly: ${header}`);
81-
});
81+
}
8282

8383
res.writeHead(200, { 'Content-Type': 'text/plain' });
8484
res.end('EOF');

0 commit comments

Comments
 (0)