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
PR-URL: #27461
Reviewed-By: Weijia Wang <[email protected]>
Reviewed-By: Yorkie Liu <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
hardfist authored and targos committed Apr 29, 2019
1 parent cf84f20 commit a37ca24
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 a37ca24

Please sign in to comment.