diff options
author | heben <heben@bytedance.com> | 2019-04-28 16:52:24 +0800 |
---|---|---|
committer | oyyd <oyydoibh@gmail.com> | 2019-04-30 17:14:32 +0800 |
commit | cb414306684ae531af09d84de54643afeb4d8b27 (patch) | |
tree | dc89e5d0edffbe06ef562329b1f2fb59db36f3d7 /test | |
parent | 9c2774e61379d77ae8768760fa06a631b5dbe19a (diff) | |
download | android-node-v8-cb414306684ae531af09d84de54643afeb4d8b27.tar.gz android-node-v8-cb414306684ae531af09d84de54643afeb4d8b27.tar.bz2 android-node-v8-cb414306684ae531af09d84de54643afeb4d8b27.zip |
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 <joyeec9h3@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-fs-read-stream-resume.js | 6 |
1 files 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 bae9ef86d0..36e3d809cd 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(); |