From 0e4f8788eb79ae3087912715bd17cf11171cbfab Mon Sep 17 00:00:00 2001 From: heben Date: Sun, 28 Apr 2019 16:52:24 +0800 Subject: [PATCH] test: add mustCallAtLeast to test-fs-read-stream-resume.js add mustCallAtLeast to test-fs-read-stream-resume.js PR-URL: https://github.com/nodejs/node/pull/27456 Reviewed-By: Joyee Cheung Reviewed-By: Ouyang Yadong Reviewed-By: Colin Ihrig Reviewed-By: Yongsheng Zhang Reviewed-By: Rich Trott --- test/parallel/test-fs-read-stream-resume.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-fs-read-stream-resume.js b/test/parallel/test-fs-read-stream-resume.js index bae9ef86d0ea2f..36e3d809cdf637 100644 --- a/test/parallel/test-fs-read-stream-resume.js +++ b/test/parallel/test-fs-read-stream-resume.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); +const common = require('../common'); const fixtures = require('../common/fixtures'); const assert = require('assert'); @@ -32,13 +32,13 @@ let first = true; const stream = fs.createReadStream(file); stream.setEncoding('utf8'); -stream.on('data', function(chunk) { +stream.on('data', common.mustCallAtLeast(function(chunk) { data += chunk; if (first) { first = false; stream.resume(); } -}); +})); process.nextTick(function() { stream.pause();