summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/run/fetch_response_finalization.js
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/testdata/run/fetch_response_finalization.js
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/testdata/run/fetch_response_finalization.js')
-rw-r--r--cli/tests/testdata/run/fetch_response_finalization.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/tests/testdata/run/fetch_response_finalization.js b/cli/tests/testdata/run/fetch_response_finalization.js
index dd7c355eb..85fc6afa3 100644
--- a/cli/tests/testdata/run/fetch_response_finalization.js
+++ b/cli/tests/testdata/run/fetch_response_finalization.js
@@ -1,6 +1,6 @@
async function doAFetch() {
const resp = await fetch("http://localhost:4545/README.md");
- console.log(Deno.resources()); // print the current resources
+ console.log(Deno[Deno.internal].core.resources()); // print the current resources
const _resp = resp;
// at this point resp can be GC'ed
}
@@ -13,4 +13,4 @@ globalThis.gc(); // force GC
// the response body is not called and the resource is not closed.
await new Promise((resolve) => setTimeout(resolve, 0));
-console.log(Deno.resources()); // print the current resources
+console.log(Deno[Deno.internal].core.resources()); // print the current resources