From d2047f1337ccb5e27598308bf5fefa913eeaa34f Mon Sep 17 00:00:00 2001 From: nasa Date: Mon, 5 Jun 2023 21:43:04 +0900 Subject: feat(node_compat): Add a close method to the FileHandle class. (#19357) ## WHY ref: https://github.com/denoland/deno/issues/19165 The FileHandle class has many missing methods compared to node. Add these. ## WHAT - Add close method --------- Co-authored-by: Matt Mastracci --- cli/tests/unit_node/_fs/_fs_handle_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/tests') diff --git a/cli/tests/unit_node/_fs/_fs_handle_test.ts b/cli/tests/unit_node/_fs/_fs_handle_test.ts index c1e5ef871..165608e1c 100644 --- a/cli/tests/unit_node/_fs/_fs_handle_test.ts +++ b/cli/tests/unit_node/_fs/_fs_handle_test.ts @@ -16,5 +16,5 @@ Deno.test("readFileSuccess", async function () { assert(data instanceof Uint8Array); assertEquals(new TextDecoder().decode(data as Uint8Array), "hello world"); - Deno.close(fileHandle.fd); + await fileHandle.close(); }); -- cgit v1.2.3