Skip to content

Commit

Permalink
test: add mustCallAtLeast to test-fs-read-stream-resume.js
Browse files Browse the repository at this point in the history
add mustCallAtLeast to test-fs-read-stream-resume.js

PR-URL: #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>
  • Loading branch information
heben authored and targos committed Apr 30, 2019
1 parent e89b6fe commit 0e4f878
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-fs-read-stream-resume.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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();
Expand Down

0 comments on commit 0e4f878

Please sign in to comment.