From aec019030d9a2dc0d108eb22995bc379a7d0da08 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 27 Mar 2018 14:48:02 +0200 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/19636 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat Reviewed-By: Weijia Wang Reviewed-By: James M Snell --- test/parallel/test-fs-read-stream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-fs-read-stream.js b/test/parallel/test-fs-read-stream.js index 8b92eb1c7aa304..870edf2820e87b 100644 --- a/test/parallel/test-fs-read-stream.js +++ b/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);