From b3e189ee4f97a9d6c5b7a2164d644aa4c7fa4b79 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Tue, 9 Jun 2020 12:18:18 +0100 Subject: fix(cli/js/process): Strengthen socket types based on pipes (#4836) --- std/examples/chat/server_test.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'std/examples/chat') diff --git a/std/examples/chat/server_test.ts b/std/examples/chat/server_test.ts index 7375de47a..8e04b71d8 100644 --- a/std/examples/chat/server_test.ts +++ b/std/examples/chat/server_test.ts @@ -7,7 +7,9 @@ import { delay } from "../../async/delay.ts"; const { test } = Deno; -async function startServer(): Promise { +async function startServer(): Promise< + Deno.Process +> { const server = Deno.run({ // TODO(lucacasonato): remove unstable once possible cmd: [ @@ -27,7 +29,7 @@ async function startServer(): Promise { const s = await r.readLine(); assert(s !== null && s.includes("chat server starting")); } catch (err) { - server.stdout!.close(); + server.stdout.close(); server.close(); } @@ -46,7 +48,7 @@ test({ assert(html.includes("ws chat example"), "body is ok"); } finally { server.close(); - server.stdout!.close(); + server.stdout.close(); } await delay(10); }, @@ -66,7 +68,7 @@ test({ assertEquals((await it.next()).value, "[1]: Hello"); } finally { server.close(); - server.stdout!.close(); + server.stdout.close(); ws!.conn.close(); } }, -- cgit v1.2.3