Skip to content

Commit

Permalink
squash: add bytesRead === length assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
LiviaMedeiros committed Jan 17, 2023
1 parent d2b9865 commit e9c875d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/parallel/test-fs-promises-write-optional-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ async function testValid(dest, buffer, options) {
assert.ok(writeResult.bytesWritten >= readResult.bytesRead);
if (length !== undefined && length !== null) {
assert.strictEqual(writeResult.bytesWritten, length);
assert.strictEqual(readResult.bytesRead, length);
}
if (offset === undefined || offset === 0) {
assert.deepStrictEqual(writeBufCopy, readBufCopy);
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-fs-write-optional-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function testValidCb(buffer, options, index, callback) {
assert.ok(bytesWritten >= bytesRead);
if (length !== undefined && length !== null) {
assert.strictEqual(bytesWritten, length);
assert.strictEqual(bytesRead, length);
}
if (offset === undefined || offset === 0) {
assert.deepStrictEqual(writeBufCopy, readBufCopy);
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-fs-write-sync-optional-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function testValid(dest, buffer, options) {
assert.ok(bytesWritten >= bytesRead);
if (length !== undefined && length !== null) {
assert.strictEqual(bytesWritten, length);
assert.strictEqual(bytesRead, length);
}
}

Expand Down

0 comments on commit e9c875d

Please sign in to comment.