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/promises/_fs_writeFile_test.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'std/node/_fs/promises/_fs_writeFile_test.ts') diff --git a/std/node/_fs/promises/_fs_writeFile_test.ts b/std/node/_fs/promises/_fs_writeFile_test.ts index 574bbfc35..777971046 100644 --- a/std/node/_fs/promises/_fs_writeFile_test.ts +++ b/std/node/_fs/promises/_fs_writeFile_test.ts @@ -12,6 +12,7 @@ const decoder = new TextDecoder("utf-8"); Deno.test("Invalid encoding results in error()", function testEncodingErrors() { assertThrowsAsync( async () => { + // @ts-expect-error Type '"made-up-encoding"' is not assignable to type await writeFile("some/path", "some data", "made-up-encoding"); }, Error, @@ -20,6 +21,7 @@ Deno.test("Invalid encoding results in error()", function testEncodingErrors() { assertThrowsAsync( async () => { await writeFile("some/path", "some data", { + // @ts-expect-error Type '"made-up-encoding"' is not assignable to type encoding: "made-up-encoding", }); }, -- cgit v1.2.3