Skip to content

Commit e9080a9

Browse files
lucacapocci94-devrichardlau
authored andcommitted
test: replace foreach with for of
PR-URL: #50790 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 0022767 commit e9080a9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎test/parallel/test-stream2-transform.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,11 +413,11 @@ const{PassThrough, Transform } = require('stream');
413413
ended=true;
414414
});
415415

416-
objects.forEach(function(obj){
416+
for(constobjofobjects){
417417
jp.write(JSON.stringify(obj));
418418
constres=jp.read();
419419
assert.deepStrictEqual(res,obj);
420-
});
420+
}
421421

422422
jp.end();
423423
// Read one more time to get the 'end' event
@@ -454,11 +454,11 @@ const{PassThrough, Transform } = require('stream');
454454
ended=true;
455455
});
456456

457-
objects.forEach(function(obj){
457+
for(constobjofobjects){
458458
js.write(obj);
459459
constres=js.read();
460460
assert.strictEqual(res,JSON.stringify(obj));
461-
});
461+
}
462462

463463
js.end();
464464
// Read one more time to get the 'end' event

0 commit comments

Comments
(0)