From c2a5da1e31e3e057c7adfdb67940ce816de405eb Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 20 Nov 2019 13:10:18 -0800 Subject: [PATCH] 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 Reviewed-By: Anna Henningsen --- test/parallel/test-stream-writable-clear-buffer.js | 6 +++--- 1 file 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 0a41f1a9979290..c4d7ae151a38fb 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();