From f36a8951a420e34d8189cda5792f5eeaa5ce85b7 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 15 Apr 2024 18:24:42 +0530 Subject: fix(ext/node): add stub for AsyncResource#asyncId() (#23372) Ref https://github.com/denoland/deno/issues/23263 --- tests/unit_node/async_hooks_test.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/unit_node/async_hooks_test.ts') 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"); +}); -- cgit v1.2.3