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 26a2ae2

Browse filesBrowse files
MoLowRafaelGSS
authored andcommitted
test: wrap missing common.mustCall
PR-URL: #45064 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Erick Wendel <erick.workspace@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent b4bedde commit 26a2ae2
Copy full SHA for 26a2ae2

File tree

Expand file treeCollapse file tree

1 file changed

+9
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-6
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-stream-promises.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-stream-promises.js
+9-6Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,27 +119,30 @@ assert.strictEqual(finished, promisify(stream.finished));
119119
{
120120
const streamObj = new Writable();
121121
assert.strictEqual(streamObj.listenerCount('end'), 0);
122-
finished(streamObj, { cleanup: false }).then(() => {
122+
finished(streamObj, { cleanup: false }).then(common.mustCall(() => {
123123
assert.strictEqual(streamObj.listenerCount('end'), 1);
124-
});
124+
}));
125+
streamObj.end();
125126
}
126127

127128
// Cleanup function should be called when cleanup is set to true
128129
// listenerCount should be 0 after calling finish
129130
{
130131
const streamObj = new Writable();
131132
assert.strictEqual(streamObj.listenerCount('end'), 0);
132-
finished(streamObj, { cleanup: true }).then(() => {
133+
finished(streamObj, { cleanup: true }).then(common.mustCall(() => {
133134
assert.strictEqual(streamObj.listenerCount('end'), 0);
134-
});
135+
}));
136+
streamObj.end();
135137
}
136138

137139
// Cleanup function should not be called when cleanup has not been set
138140
// listenerCount should be 1 after calling finish
139141
{
140142
const streamObj = new Writable();
141143
assert.strictEqual(streamObj.listenerCount('end'), 0);
142-
finished(streamObj).then(() => {
144+
finished(streamObj).then(common.mustCall(() => {
143145
assert.strictEqual(streamObj.listenerCount('end'), 1);
144-
});
146+
}));
147+
streamObj.end();
145148
}

0 commit comments

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