Skip to content
Permalink
Browse files

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>
  • Loading branch information
Trott authored and MylesBorins committed Nov 20, 2019
1 parent 516bdaf commit 88bca0fcc07088889c65943351a10e0162aadf49
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/parallel/test-stream-writable-clear-buffer.js
@@ -3,7 +3,7 @@
// This test ensures that the _writeableState.bufferedRequestCount and
// the actual buffered request count are the same.

require('../common');
const common = require('../common');
const Stream = require('stream');
const assert = require('assert');

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

for (let i = 1; i <= 5; i++) {
testStream.write(i, () => {
testStream.write(i, common.mustCall(() => {
assert.strictEqual(
testStream._writableState.bufferedRequestCount,
testStream._writableState.getBuffer().length
);
});
}));
}

testStream.end();

0 comments on commit 88bca0f

Please sign in to comment.
You can’t perform that action at this time.