We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4dd0f5a commit c2a5da1Copy full SHA for c2a5da1
test/parallel/test-stream-writable-clear-buffer.js
@@ -3,7 +3,7 @@
3
// This test ensures that the _writeableState.bufferedRequestCount and
4
// the actual buffered request count are the same.
5
6
-require('../common');
+const common = require('../common');
7
const Stream = require('stream');
8
const assert = require('assert');
9
@@ -24,12 +24,12 @@ const testStream = new StreamWritable();
24
testStream.cork();
25
26
for (let i = 1; i <= 5; i++) {
27
- testStream.write(i, () => {
+ testStream.write(i, common.mustCall(() => {
28
assert.strictEqual(
29
testStream._writableState.bufferedRequestCount,
30
testStream._writableState.getBuffer().length
31
);
32
- });
+ }));
33
}
34
35
testStream.end();
0 commit comments