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/read_file_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/read_file_test.ts')
| -rw-r--r-- | cli/tests/unit/read_file_test.ts | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/cli/tests/unit/read_file_test.ts b/cli/tests/unit/read_file_test.ts index 6f5392ff4..24ec1aedc 100644 --- a/cli/tests/unit/read_file_test.ts +++ b/cli/tests/unit/read_file_test.ts @@ -75,18 +75,14 @@ Deno.test({ permissions: { read: true } }, function readFileSyncLoop() { Deno.test( { permissions: { read: true } }, async function readFileDoesNotLeakResources() { - const resourcesBefore = Deno.resources(); await assertRejects(async () => await Deno.readFile("cli")); - assertEquals(resourcesBefore, Deno.resources()); }, ); Deno.test( { permissions: { read: true } }, function readFileSyncDoesNotLeakResources() { - const resourcesBefore = Deno.resources(); assertThrows(() => Deno.readFileSync("cli")); - assertEquals(resourcesBefore, Deno.resources()); }, ); |
