summaryrefslogtreecommitdiff
path: root/cli/tests/unit_node/_fs/_fs_open_test.ts
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-01-24 10:27:29 +1100
committerGitHub <noreply@github.com>2024-01-24 00:27:29 +0100
commit947ce41e99637dae4cf46126b8bb2d4107fb9913 (patch)
tree094cdca89b38d358bb801702b4caf5dcb6374c80 /cli/tests/unit_node/_fs/_fs_open_test.ts
parent4eedac3604dad9f366d28868077eb02eddc22661 (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.ts6
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);
},
});