Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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: #19304
  • Loading branch information
sameer-coder committed Mar 21, 2018
commit 0778b5866510d04312da97881b701e73e6d6c750
12 changes: 10 additions & 2 deletions test/parallel/test-fs-ready-event-stream.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@

'use strict';
const common = require('../common');
const fs = require('fs');
const assert = require('assert');
const path = require('path');
const tmpdir = require('../common/tmpdir');

const file = fs.createReadStream(__filename);
const readStream = fs.createReadStream(__filename);
readStream.on('ready', common.mustCall(() => {}, 1));

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