diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-04-15 18:24:42 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-15 12:54:42 +0000 |
commit | f36a8951a420e34d8189cda5792f5eeaa5ce85b7 (patch) | |
tree | b7eeece07c56d0e5c74735745e536c984a1b5dec /tests/unit_node/async_hooks_test.ts | |
parent | 1835b4f06189560eb17a103b8db05e011a7cd799 (diff) |
fix(ext/node): add stub for AsyncResource#asyncId() (#23372)
Ref https://github.com/denoland/deno/issues/23263
Diffstat (limited to 'tests/unit_node/async_hooks_test.ts')
-rw-r--r-- | tests/unit_node/async_hooks_test.ts | 5 |
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 2ed197c2d..8d94180cf 100644 --- a/tests/unit_node/async_hooks_test.ts +++ b/tests/unit_node/async_hooks_test.ts @@ -125,3 +125,8 @@ Deno.test(async function bind() { assertEquals(await deferred.promise, null); }); + +Deno.test(function asyncResourceStub() { + const resource = new AsyncResource("dbquery"); + assert(typeof resource.asyncId() === "number"); +}); |