From 7bf8117ee5e58ff18aa2ca2032c7d2cdacc7b9aa Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sun, 3 Apr 2022 00:57:24 +0200 Subject: [PATCH] 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 Reviewed-By: Mestery --- test/parallel/test-fs-promises-file-handle-write.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-fs-promises-file-handle-write.js b/test/parallel/test-fs-promises-file-handle-write.js index 3c25842d8bf9cc..8d020522767853 100644 --- a/test/parallel/test-fs-promises-file-handle-write.js +++ b/test/parallel/test-fs-promises-file-handle-write.js @@ -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),