Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fs: add test for zero-length read
Co-authored-by: Antoine du Hamel <[email protected]>
  • Loading branch information
fracsinus and aduh95 committed Nov 23, 2021
commit 3d496879b539bca167236048a5101fac725f9f1c
6 changes: 3 additions & 3 deletions test/parallel/test-fs-promises-file-handle-read.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ async function validateReadWithPositionZero() {
}
}

async function validateReadLength() {
const len = 1;
async function validateReadLength(len) {
const buf = Buffer.alloc(4);
const opts = { useConf: true };
const filePath = fixtures.path('x.txt');
Expand All @@ -108,5 +107,6 @@ async function validateReadLength() {
await validateLargeRead({ useConf: true });
await validateReadNoParams();
await validateReadWithPositionZero();
await validateReadLength();
await validateReadLength(0);
await validateReadLength(1);
})().then(common.mustCall());