Permalink
Browse files

test: use createReadStream instead of ReadStream

This commit updates test-fs-read-stream to use fs.createReadStream
instead of using fs.ReadStream. All other places in this test use
the former.

PR-URL: #19636
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information...
danbev committed Mar 27, 2018
1 parent 0434bd4 commit aec019030d9a2dc0d108eb22995bc379a7d0da08
Showing with 1 addition and 1 deletion.
  1. +1 −1 test/parallel/test-fs-read-stream.js
@@ -35,7 +35,7 @@ const rangeFile = fixtures.path('x.txt');
let paused = false;
let bytesRead = 0;
const file = fs.ReadStream(fn);
const file = fs.createReadStream(fn);
const fileSize = fs.statSync(fn).size;
assert.strictEqual(file.bytesRead, 0);

0 comments on commit aec0190

Please sign in to comment.