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();