diff options
author | Rich Trott <rtrott@gmail.com> | 2019-11-20 13:10:18 -0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-11-22 11:41:32 -0800 |
commit | 19e44efdfba4450ea6cc32780adda42fd31a10a7 (patch) | |
tree | b039ccd419d94a0e7ee83a754700dda8d276961d /test | |
parent | 1a35db590f32793cfdef093f717b62c39128f8c0 (diff) | |
download | android-node-v8-19e44efdfba4450ea6cc32780adda42fd31a10a7.tar.gz android-node-v8-19e44efdfba4450ea6cc32780adda42fd31a10a7.tar.bz2 android-node-v8-19e44efdfba4450ea6cc32780adda42fd31a10a7.zip |
test: add common.mustCall() to stream test
Refs: https://github.com/nodejs/node/pull/30561/files#r348667256
PR-URL: https://github.com/nodejs/node/pull/30561
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-stream-writable-clear-buffer.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-stream-writable-clear-buffer.js b/test/parallel/test-stream-writable-clear-buffer.js index 0a41f1a997..c4d7ae151a 100644 --- a/test/parallel/test-stream-writable-clear-buffer.js +++ b/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(); |