diff options
| author | Bert Belder <bertbelder@gmail.com> | 2019-05-23 19:04:06 -0700 |
|---|---|---|
| committer | Bert Belder <bertbelder@gmail.com> | 2019-05-29 09:50:12 -0700 |
| commit | b95f79d74cbcf3492abd95d4c90839e32f51399f (patch) | |
| tree | d0c68f01c798da1e3b81930cfa58a5370c56775f /http/file_server_test.ts | |
| parent | 5b37b560fb047e1df6e6f68fcbaece922637a93c (diff) | |
io: refactor BufReader/Writer interfaces to be more idiomatic (denoland/deno_std#444)
Thanks Vincent Le Goff (@zekth) for porting over the CSV reader
implementation.
Fixes: denoland/deno_std#436
Original: https://github.com/denoland/deno_std/commit/0ee6334b698072b50c6f5ac8d42d34dc4c94b948
Diffstat (limited to 'http/file_server_test.ts')
| -rw-r--r-- | http/file_server_test.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/http/file_server_test.ts b/http/file_server_test.ts index 578b0e624..1e2d86c4d 100644 --- a/http/file_server_test.ts +++ b/http/file_server_test.ts @@ -3,7 +3,7 @@ const { readFile, run } = Deno; import { test } from "../testing/mod.ts"; import { assert, assertEquals } from "../testing/asserts.ts"; -import { BufReader } from "../io/bufio.ts"; +import { BufReader, EOF } from "../io/bufio.ts"; import { TextProtoReader } from "../textproto/mod.ts"; let fileServer; @@ -22,10 +22,10 @@ async function startFileServer(): Promise<void> { }); // Once fileServer is ready it will write to its stdout. const r = new TextProtoReader(new BufReader(fileServer.stdout)); - const [s, err] = await r.readLine(); - assert(err == null); - assert(s.includes("server listening")); + const s = await r.readLine(); + assert(s !== EOF && s.includes("server listening")); } + function killFileServer(): void { fileServer.close(); fileServer.stdout.close(); |
