Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cd00cdc

Browse filesBrowse files
DevPrestargos
authored andcommitted
test: replace forEach() in test-stream-pipe-unpipe-stream
PR-URL: #50786 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent b228db5 commit cd00cdc
Copy full SHA for cd00cdc

File tree

Expand file treeCollapse file tree

1 file changed

+4
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-5
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-stream-pipe-unpipe-streams.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-stream-pipe-unpipe-streams.js
+4-5Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,12 @@ assert.strictEqual(source._readableState.pipes.length, 0);
4545
const checkSrcCleanup = common.mustCall(() => {
4646
assert.strictEqual(source._readableState.pipes.length, 0);
4747
assert.strictEqual(source._readableState.flowing, false);
48-
49-
srcCheckEventNames.forEach((eventName) => {
48+
for (const eventName of srcCheckEventNames) {
5049
assert.strictEqual(
5150
source.listenerCount(eventName), 0,
5251
`source's '${eventName}' event listeners not removed`
5352
);
54-
});
53+
}
5554
});
5655

5756
function checkDestCleanup(dest) {
@@ -65,13 +64,13 @@ assert.strictEqual(source._readableState.pipes.length, 0);
6564
'listener which is `unpipeChecker`'
6665
);
6766
dest.removeListener('unpipe', unpipeChecker);
68-
destCheckEventNames.forEach((eventName) => {
67+
for (const eventName of destCheckEventNames) {
6968
assert.strictEqual(
7069
dest.listenerCount(eventName), 0,
7170
`destination{${currentDestId}}'s '${eventName}' event ` +
7271
'listeners not removed'
7372
);
74-
});
73+
}
7574

7675
if (--destCount === 0)
7776
checkSrcCleanup();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.