summaryrefslogtreecommitdiff
path: root/tests/unit_node/async_hooks_test.ts
diff options
context:
space:
mode:
authorMarvin Hagemeister <marvin@deno.com>2024-05-15 00:42:43 +0200
committerGitHub <noreply@github.com>2024-05-15 00:42:43 +0200
commite389917535e8e7ef13920a96f9c9c1e1ec2b2c55 (patch)
tree98b7f7ea7400d7995b4947d6e5bd1bc719f6223b /tests/unit_node/async_hooks_test.ts
parent3b51ea7ba8b7e8a1786e44538bea038f6d146847 (diff)
fix(node): stub `AsyncResource.emitDestroy()` (#23802)
<!-- Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> Fixes https://github.com/denoland/deno/issues/23397
Diffstat (limited to 'tests/unit_node/async_hooks_test.ts')
-rw-r--r--tests/unit_node/async_hooks_test.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit_node/async_hooks_test.ts b/tests/unit_node/async_hooks_test.ts
index 8d94180cf..46d7dd785 100644
--- a/tests/unit_node/async_hooks_test.ts
+++ b/tests/unit_node/async_hooks_test.ts
@@ -130,3 +130,8 @@ Deno.test(function asyncResourceStub() {
const resource = new AsyncResource("dbquery");
assert(typeof resource.asyncId() === "number");
});
+
+Deno.test(function emitDestroyStub() {
+ const resource = new AsyncResource("foo");
+ assert(typeof resource.emitDestroy === "function");
+});