From 1b450015e7046bff952b2841e73074d432006272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 26 Apr 2023 14:54:03 +0200 Subject: BREAKING(unstable): remove "Deno.serve(handler, options)" overload (#18759) In preparation to stabilization of the API this overload was decided to be removed. --- cli/tests/unit_node/async_hooks_test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cli/tests/unit_node/async_hooks_test.ts') 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"); -- cgit v1.2.3