From 49c54c0805ab26410a62e0251fee3a28b98c0e13 Mon Sep 17 00:00:00 2001 From: Benjamin Lupton Date: Wed, 24 Jun 2020 12:32:43 +1000 Subject: fix(std/node): fix readFile types, add encoding types (#6451) --- std/node/_fs/_fs_writeFile_test.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'std/node/_fs/_fs_writeFile_test.ts') 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", }); }, -- cgit v1.2.3