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 /test_ffi | |
| 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 'test_ffi')
| -rw-r--r-- | test_ffi/tests/test.js | 4 | ||||
| -rw-r--r-- | test_ffi/tests/thread_safe_test.js | 2 |
2 files changed, 2 insertions, 4 deletions
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); diff --git a/test_ffi/tests/thread_safe_test.js b/test_ffi/tests/thread_safe_test.js index b983fd48d..fffa61a04 100644 --- a/test_ffi/tests/thread_safe_test.js +++ b/test_ffi/tests/thread_safe_test.js @@ -9,8 +9,6 @@ const [libPrefix, libSuffix] = { }[Deno.build.os]; const libPath = `${targetDir}/${libPrefix}test_ffi.${libSuffix}`; -const resourcesPre = Deno.resources(); - const dylib = Deno.dlopen(libPath, { store_function: { parameters: ["function"], |
