diff --git a/test/parallel/test-fs-promises-write-optional-params.js b/test/parallel/test-fs-promises-write-optional-params.js index c87f6a35db08c3..4dd87155153769 100644 --- a/test/parallel/test-fs-promises-write-optional-params.js +++ b/test/parallel/test-fs-promises-write-optional-params.js @@ -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); diff --git a/test/parallel/test-fs-write-optional-params.js b/test/parallel/test-fs-write-optional-params.js index c5660a18d6817c..11390ad42dbfd4 100644 --- a/test/parallel/test-fs-write-optional-params.js +++ b/test/parallel/test-fs-write-optional-params.js @@ -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); diff --git a/test/parallel/test-fs-write-sync-optional-params.js b/test/parallel/test-fs-write-sync-optional-params.js index bca19eddde28f9..ac2c501f682242 100644 --- a/test/parallel/test-fs-write-sync-optional-params.js +++ b/test/parallel/test-fs-write-sync-optional-params.js @@ -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); } }