test: improve FileHandle.prototype.write coverage

Refs: https://github.com/nodejs/node/pull/42518

PR-URL: https://github.com/nodejs/node/pull/42541
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
This commit is contained in:
Antoine du Hamel authored and Michaël Zasso committed 2022-07-31 09:43:33 +02:00
1 parent 82d5e57ac0
commit a7b865ca8d
1 file changed
+1 -1
@@ -53,7 +53,7 @@ async function validateNonUint8ArrayWrite() {
async function validateNonStringValuesWrite() {
const filePathForHandle = path.resolve(tmpDir, 'tmp-non-string-write.txt');
const fileHandle = await open(filePathForHandle, 'w+');
const nonStringValues = [123, {}, new Map()];
const nonStringValues = [123, {}, new Map(), null, undefined, 0n, () => {}, Symbol(), true];
for (const nonStringValue of nonStringValues) {
await assert.rejects(
fileHandle.write(nonStringValue),