From 947ce41e99637dae4cf46126b8bb2d4107fb9913 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Wed, 24 Jan 2024 10:27:29 +1100 Subject: 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()`. --- test_ffi/tests/test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test_ffi/tests/test.js') diff --git a/test_ffi/tests/test.js b/test_ffi/tests/test.js index 8f4506549..c1aa68fad 100644 --- a/test_ffi/tests/test.js +++ b/test_ffi/tests/test.js @@ -20,7 +20,7 @@ const [libPrefix, libSuffix] = { }[Deno.build.os]; const libPath = `${targetDir}/${libPrefix}test_ffi.${libSuffix}`; -const resourcesPre = Deno.resources(); +const resourcesPre = Deno[Deno.internal].core.resources(); // dlopen shouldn't panic assertThrows(() => { @@ -765,7 +765,7 @@ testOptimized(hash, () => hash()); nestedCallback.close(); addToFooCallback.close(); - const resourcesPost = Deno.resources(); + const resourcesPost = Deno[Deno.internal].core.resources(); const preStr = JSON.stringify(resourcesPre, null, 2); const postStr = JSON.stringify(resourcesPost, null, 2); -- cgit v1.2.3