Skip to content

Commit c2a5da1

Browse files
Trotttargos
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 <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 4dd0f5a commit c2a5da1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
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)