summaryrefslogtreecommitdiff
path: root/cli/tests/unit_node/async_hooks_test.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-04-26 14:54:03 +0200
committerGitHub <noreply@github.com>2023-04-26 14:54:03 +0200
commit1b450015e7046bff952b2841e73074d432006272 (patch)
treecc9e5f44ad1c98eae4d3461de478a8b080100060 /cli/tests/unit_node/async_hooks_test.ts
parent036778c2e8e159ef1e586de4102f823367b7c554 (diff)
BREAKING(unstable): remove "Deno.serve(handler, options)" overload (#18759)
In preparation to stabilization of the API this overload was decided to be removed.
Diffstat (limited to 'cli/tests/unit_node/async_hooks_test.ts')
-rw-r--r--cli/tests/unit_node/async_hooks_test.ts8
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");