Skip to content
Closed
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
[Squash] typo
Co-authored-by: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
jasnell and RaisinTen authored Feb 23, 2021
commit 4c8786ce06aa63b72951a4b53d1dbde9d3df4b68
4 changes: 2 additions & 2 deletions test/parallel/test-fs-truncate.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,14 @@ function testFtruncate(cb) {
{
const file1 = path.resolve(tmp, 'truncate-file-1.txt');
fs.writeFileSync(file1, 'Hi');
fs.truncateSync(file1, -1); // Negative cooerced to 0, No error.
fs.truncateSync(file1, -1); // Negative coerced to 0, No error.
assert(fs.readFileSync(file1).equals(Buffer.alloc(0)));
}

{
const file1 = path.resolve(tmp, 'truncate-file-2.txt');
fs.writeFileSync(file1, 'Hi');
// Negative cooerced to 0, No error.
// Negative coerced to 0, No error.
fs.truncate(file1, -1, common.mustSucceed(() => {
assert(fs.readFileSync(file1).equals(Buffer.alloc(0)));
}));
Expand Down