diff options
Diffstat (limited to 'cli/tests/unit_node/async_hooks_test.ts')
-rw-r--r-- | cli/tests/unit_node/async_hooks_test.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/tests/unit_node/async_hooks_test.ts b/cli/tests/unit_node/async_hooks_test.ts index 73d6a99bc..406244315 100644 --- a/cli/tests/unit_node/async_hooks_test.ts +++ b/cli/tests/unit_node/async_hooks_test.ts @@ -41,7 +41,10 @@ Deno.test(async function bar() { let differentScopeDone = false; const als = new AsyncLocalStorage(); const ac = new AbortController(); - const server = Deno.serve(() => { + const server = Deno.serve({ + signal: ac.signal, + port: 4000, + }, () => { const differentScope = als.run(123, () => AsyncResource.bind(() => { differentScopeDone = true; @@ -54,9 +57,6 @@ Deno.test(async function bar() { await new Promise((res) => setTimeout(res, 10)); return new Response(als.getStore() as string); // "Hello World" }); - }, { - signal: ac.signal, - port: 4000, }); const res = await fetch("http://localhost:4000"); |