Skip to content

Commit d1cd117

Browse files
Trotttargos
authored andcommitted
test: address deprecation warning
fs.truncateSync() emits a deprecation warning when called with a file descriptor. Move to fs.ftruncateSync(). PR-URL: #38448 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent a696f10 commit d1cd117

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/pummel/test-fs-largefile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const fd = fs.openSync(filepath, 'w+');
3434
const offset = 5 * 1024 * 1024 * 1024; // 5GB
3535
const message = 'Large File';
3636

37-
fs.truncateSync(fd, offset);
37+
fs.ftruncateSync(fd, offset);
3838
assert.strictEqual(fs.statSync(filepath).size, offset);
3939
const writeBuf = Buffer.from(message);
4040
fs.writeSync(fd, writeBuf, 0, writeBuf.length, offset);

0 commit comments

Comments
 (0)