Skip to content

Commit

Permalink
test: add mustCallAtLeast to test-fs-read-stream-fd test
Browse files Browse the repository at this point in the history
Change-Id: Ib74392326ee7471732488c1cf3c32f08685e0439
  • Loading branch information
hardfist committed Apr 28, 2019
1 parent 757f3f8 commit 8963852
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-fs-read-stream-fd.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 fs = require('fs');
const assert = require('assert');
const path = require('path');
Expand All @@ -35,9 +35,9 @@ fs.writeFileSync(file, input);
const fd = fs.openSync(file, 'r');
const stream = fs.createReadStream(null, { fd: fd, encoding: 'utf8' });

stream.on('data', (data) => {
stream.on('data', common.mustCallAtLeast((data) => {
output += data;
});
}));

process.on('exit', () => {
assert.strictEqual(output, input);
Expand Down

0 comments on commit 8963852

Please sign in to comment.