diff options
Diffstat (limited to 'std/http/racing_server_test.ts')
-rw-r--r-- | std/http/racing_server_test.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/std/http/racing_server_test.ts b/std/http/racing_server_test.ts index 054dfc385..7e510f13d 100644 --- a/std/http/racing_server_test.ts +++ b/std/http/racing_server_test.ts @@ -1,11 +1,10 @@ import { assert, assertEquals } from "../testing/asserts.ts"; import { BufReader, BufWriter } from "../io/bufio.ts"; import { TextProtoReader } from "../textproto/mod.ts"; -const { connect, run, test } = Deno; let server: Deno.Process<Deno.RunOptions & { stdout: "piped" }>; async function startServer(): Promise<void> { - server = run({ + server = Deno.run({ // TODO(lucacasonato): remove unstable when stabilized cmd: [Deno.execPath(), "run", "--unstable", "-A", "http/racing_server.ts"], stdout: "piped", @@ -59,10 +58,10 @@ content-length: 6 Step7 `; -test("serverPipelineRace", async function (): Promise<void> { +Deno.test("serverPipelineRace", async function (): Promise<void> { await startServer(); - const conn = await connect({ port: 4501 }); + const conn = await Deno.connect({ port: 4501 }); const r = new TextProtoReader(new BufReader(conn)); const w = new BufWriter(conn); await w.write(new TextEncoder().encode(input)); |