Skip to content

Commit

Permalink
fs,net: updated test case to check for ready event on writestream
Browse files Browse the repository at this point in the history
updated test case updated test case to check for ready event
on writestream

Fixes: nodejs#19304
  • Loading branch information
sameer-coder committed Mar 21, 2018
1 parent e93c869 commit 0778b58
Showing 1 changed file with 10 additions and 2 deletions.
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));

0 comments on commit 0778b58

Please sign in to comment.