Skip to content

Commit 15731b4

Browse files
mmacherarichardlau
authored andcommitted
test: replace forEach test-http-server-multiheaders2
PR-URL: #50794 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent bb7d7f3 commit 15731b4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ const multipleForbidden = [
7070
];
7171

7272
constserver=http.createServer(function(req,res){
73-
multipleForbidden.forEach(function(header){
73+
for(constheaderofmultipleForbidden){
7474
assert.strictEqual(req.headers[header.toLowerCase()],'foo',
7575
`header parsed incorrectly: ${header}`);
76-
});
77-
multipleAllowed.forEach(function(header){
76+
}
77+
for(constheaderofmultipleAllowed){
7878
constsep=(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)