Skip to content

Commit

Permalink
test: use createReadStream instead of ReadStream
Browse files Browse the repository at this point in the history
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 authored and targos committed Apr 2, 2018
1 parent 7ae2ca4 commit 94b28aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-fs-read-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 94b28aa

Please sign in to comment.