Skip to content

Commit

Permalink
test: add test for readStream.path when fd is specified
Browse files Browse the repository at this point in the history
Refs: #40252 (review)

PR-URL: #40359
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Ayase-252 authored and targos committed Oct 13, 2021
1 parent 07dae7f commit 641b1bb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/parallel/test-fs-read-stream-fd.js
Expand Up @@ -35,6 +35,8 @@ fs.writeFileSync(file, input);
const fd = fs.openSync(file, 'r');
const stream = fs.createReadStream(null, { fd: fd, encoding: 'utf8' });

assert.strictEqual(stream.path, undefined);

stream.on('data', common.mustCallAtLeast((data) => {
output += data;
}));
Expand Down

0 comments on commit 641b1bb

Please sign in to comment.