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 <starkwang@126.com> Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent cf84f20 commit a37ca24

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
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+
constcommon=require('../common');
2424
constfs=require('fs');
2525
constassert=require('assert');
2626
constpath=require('path');
@@ -35,9 +35,9 @@ fs.writeFileSync(file, input);
3535
constfd=fs.openSync(file,'r');
3636
conststream=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)