mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
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:
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),
|
||||
|
||||
Reference in new issue
Block a user