diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-01-24 10:27:29 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-24 00:27:29 +0100 |
commit | 947ce41e99637dae4cf46126b8bb2d4107fb9913 (patch) | |
tree | 094cdca89b38d358bb801702b4caf5dcb6374c80 /cli/tests/unit_node/_fs/_fs_open_test.ts | |
parent | 4eedac3604dad9f366d28868077eb02eddc22661 (diff) |
feat: deprecate `Deno.resources()` (#22059)
Most uses of `Deno.resources()` within tests, as they previously checked
for leaked resources. This is not needed as the test runner does this
automatically. Other internal uses of this API have been replaced with
the internal `Deno[Deno.internal].core.resources()`.
Diffstat (limited to 'cli/tests/unit_node/_fs/_fs_open_test.ts')
-rw-r--r-- | cli/tests/unit_node/_fs/_fs_open_test.ts | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/cli/tests/unit_node/_fs/_fs_open_test.ts b/cli/tests/unit_node/_fs/_fs_open_test.ts index af31d24a3..fa79aa68f 100644 --- a/cli/tests/unit_node/_fs/_fs_open_test.ts +++ b/cli/tests/unit_node/_fs/_fs_open_test.ts @@ -10,7 +10,6 @@ import { O_WRONLY, } from "node:constants"; import { - assert, assertEquals, assertThrows, fail, @@ -35,7 +34,6 @@ Deno.test({ }) .then((fd) => { fd1 = fd; - assert(Deno.resources()[fd], `${fd}`); }, () => fail()) .finally(() => closeSync(fd1)); }, @@ -46,7 +44,6 @@ Deno.test({ fn() { const file = Deno.makeTempFileSync(); const fd = openSync(file, "r"); - assert(Deno.resources()[fd]); closeSync(fd); }, }); @@ -58,7 +55,6 @@ Deno.test({ const fd = openSync(file, "a"); assertEquals(typeof fd, "number"); assertEquals(existsSync(file), true); - assert(Deno.resources()[fd]); closeSync(fd); }, }); @@ -225,7 +221,6 @@ Deno.test({ const fd = openSync(file, O_APPEND | O_CREAT | O_WRONLY); assertEquals(typeof fd, "number"); assertEquals(existsSync(file), true); - assert(Deno.resources()[fd]); closeSync(fd); }, }); @@ -403,7 +398,6 @@ Deno.test("[std/node/fs] open callback isn't called twice if error is thrown", a fn() { const file = Deno.makeTempFileSync(); const fd = openSync(file, 0); - assert(Deno.resources()[fd]); closeSync(fd); }, }); |