Skip to content

Commit 0778b58

Browse files
committed
fs,net: updated test case to check for ready event on writestream
updated test case updated test case to check for ready event on writestream Fixes: nodejs#19304
1 parent e93c869 commit 0778b58

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed
+10-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
12
'use strict';
23
const common = require('../common');
34
const fs = require('fs');
5+
const assert = require('assert');
6+
const path = require('path');
7+
const tmpdir = require('../common/tmpdir');
48

5-
const file = fs.createReadStream(__filename);
9+
const readStream = fs.createReadStream(__filename);
10+
readStream.on('ready', common.mustCall(() => {}, 1));
611

7-
file.on('ready', common.mustCall(() => {}, 1));
12+
const writeFile = path.join(tmpdir.path, 'write-fsreadyevent.txt');
13+
tmpdir.refresh();
14+
let writeStream = fs.createWriteStream(writeFile, { autoClose: true });
15+
writeStream.on('ready', common.mustCall(() => {}, 1));

0 commit comments

Comments
 (0)