Skip to content

Commit a37ca24

Browse files
hardfisttargos
authored andcommitted
test: add mustCallAtLeast to test-fs-read-stream-fd test
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]>
1 parent cf84f20 commit a37ca24

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/parallel/test-fs-read-stream-fd.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
'use strict';
23-
require('../common');
23+
const common = require('../common');
2424
const fs = require('fs');
2525
const assert = require('assert');
2626
const path = require('path');
@@ -35,9 +35,9 @@ fs.writeFileSync(file, input);
3535
const fd = fs.openSync(file, 'r');
3636
const stream = fs.createReadStream(null, { fd: fd, encoding: 'utf8' });
3737

38-
stream.on('data', (data) => {
38+
stream.on('data', common.mustCallAtLeast((data) => {
3939
output += data;
40-
});
40+
}));
4141

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

0 commit comments

Comments
 (0)