Skip to content

Commit

Permalink
squash: add test cases for fs.write
Browse files Browse the repository at this point in the history
  • Loading branch information
LiviaMedeiros committed Feb 27, 2022
1 parent 2cbba62 commit 74d6d47
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/parallel/test-fs-write.js
Expand Up @@ -155,7 +155,11 @@ fs.open(fn4, 'w', 0o644, common.mustSucceed((fd) => {
);
});

[false, 5, {}, [], null, undefined].forEach((data) => {
[
false, 5, {}, [], null, undefined,
new String('notPrimitive'),
{ [Symbol.toPrimitive]: (hint) => 'amObject' },
].forEach((data) => {
assert.throws(
() => fs.write(1, data, common.mustNotCall()),
{
Expand Down

0 comments on commit 74d6d47

Please sign in to comment.