Skip to content

Commit bdda713

Browse files
test: change function to write to file
Co-authored-by: Darshan Sen <[email protected]>
1 parent 622ed80 commit bdda713

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/parallel/test-fs-promises-file-handle-readFile.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ async function doReadAndCancel() {
9797
const kIoMaxLength = 2 ** 31 - 1;
9898

9999
const newFile = path.resolve(tmpDir, 'dogs-running3.txt');
100-
const buffer = Buffer.alloc(kIoMaxLength + 1);
101-
await writeFile(newFile, buffer);
100+
await truncate(newFile, kIoMaxLength + 1);
102101

103102
const fileHandle = await open(newFile, 'r');
104103

0 commit comments

Comments
 (0)