summaryrefslogtreecommitdiff
path: root/std/node/_fs/_fs_writeFile_test.ts
diff options
context:
space:
mode:
authorBenjamin Lupton <b@lupton.cc>2020-06-24 12:32:43 +1000
committerGitHub <noreply@github.com>2020-06-23 22:32:43 -0400
commit49c54c0805ab26410a62e0251fee3a28b98c0e13 (patch)
treeb9fcb2713622f2739557f2caffd51d8bb454300b /std/node/_fs/_fs_writeFile_test.ts
parentd16337cc9c59732fe81655482e08b72d844472e6 (diff)
fix(std/node): fix readFile types, add encoding types (#6451)
Diffstat (limited to 'std/node/_fs/_fs_writeFile_test.ts')
-rw-r--r--std/node/_fs/_fs_writeFile_test.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/std/node/_fs/_fs_writeFile_test.ts b/std/node/_fs/_fs_writeFile_test.ts
index 81913d0b0..3f874a2af 100644
--- a/std/node/_fs/_fs_writeFile_test.ts
+++ b/std/node/_fs/_fs_writeFile_test.ts
@@ -24,6 +24,7 @@ Deno.test("Callback must be a function error", function fn() {
Deno.test("Invalid encoding results in error()", function testEncodingErrors() {
assertThrows(
() => {
+ // @ts-expect-error Type '"made-up-encoding"' is not assignable to type
writeFile("some/path", "some data", "made-up-encoding", () => {});
},
Error,
@@ -32,6 +33,7 @@ Deno.test("Invalid encoding results in error()", function testEncodingErrors() {
assertThrows(
() => {
+ // @ts-expect-error Type '"made-up-encoding"' is not assignable to type
writeFileSync("some/path", "some data", "made-up-encoding");
},
Error,
@@ -44,6 +46,7 @@ Deno.test("Invalid encoding results in error()", function testEncodingErrors() {
"some/path",
"some data",
{
+ // @ts-expect-error Type '"made-up-encoding"' is not assignable to type
encoding: "made-up-encoding",
},
() => {}
@@ -56,6 +59,7 @@ Deno.test("Invalid encoding results in error()", function testEncodingErrors() {
assertThrows(
() => {
writeFileSync("some/path", "some data", {
+ // @ts-expect-error Type '"made-up-encoding"' is not assignable to type
encoding: "made-up-encoding",
});
},