diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2019-05-30 14:59:30 +0200 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2019-05-30 08:59:30 -0400 |
| commit | 50a79584cb12129b3db1ef3e0eb9d0c8b9f20b62 (patch) | |
| tree | ee9a90a8b8018c03b1e1a6ace07abdaa494ea90d /http/file_server_test.ts | |
| parent | 80b3c486f6222f65b52eb2eca903b67312e8ce0c (diff) | |
chore: Implement strict mode (denoland/deno_std#453)
Original: https://github.com/denoland/deno_std/commit/be24677d15494e83eea2e99bfc5ccfdde31cb892
Diffstat (limited to 'http/file_server_test.ts')
| -rw-r--r-- | http/file_server_test.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/http/file_server_test.ts b/http/file_server_test.ts index 1e2d86c4d..201524e7b 100644 --- a/http/file_server_test.ts +++ b/http/file_server_test.ts @@ -6,7 +6,8 @@ import { assert, assertEquals } from "../testing/asserts.ts"; import { BufReader, EOF } from "../io/bufio.ts"; import { TextProtoReader } from "../textproto/mod.ts"; -let fileServer; +let fileServer: Deno.Process; + async function startFileServer(): Promise<void> { fileServer = run({ args: [ @@ -21,14 +22,14 @@ async function startFileServer(): Promise<void> { stdout: "piped" }); // Once fileServer is ready it will write to its stdout. - const r = new TextProtoReader(new BufReader(fileServer.stdout)); + const r = new TextProtoReader(new BufReader(fileServer.stdout!)); const s = await r.readLine(); assert(s !== EOF && s.includes("server listening")); } function killFileServer(): void { fileServer.close(); - fileServer.stdout.close(); + fileServer.stdout!.close(); } test(async function serveFile(): Promise<void> { |
