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 36671f9

Browse filesBrowse files
Trottaddaleax
authored andcommitted
test: add common.mustCall() to stream test
Refs: https://github.com/nodejs/node/pull/30561/files#r348667256 PR-URL: #30561 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 106235f commit 36671f9
Copy full SHA for 36671f9

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-stream-writable-clear-buffer.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-stream-writable-clear-buffer.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This test ensures that the _writeableState.bufferedRequestCount and
44
// the actual buffered request count are the same.
55

6-
require('../common');
6+
const common = require('../common');
77
const Stream = require('stream');
88
const assert = require('assert');
99

@@ -24,12 +24,12 @@ const testStream = new StreamWritable();
2424
testStream.cork();
2525

2626
for (let i = 1; i <= 5; i++) {
27-
testStream.write(i, () => {
27+
testStream.write(i, common.mustCall(() => {
2828
assert.strictEqual(
2929
testStream._writableState.bufferedRequestCount,
3030
testStream._writableState.getBuffer().length
3131
);
32-
});
32+
}));
3333
}
3434

3535
testStream.end();

0 commit comments

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