summaryrefslogtreecommitdiff
path: root/std/http/racing_server_test.ts
diff options
context:
space:
mode:
authorYusuke Sakurai <kerokerokerop@gmail.com>2020-02-07 16:23:38 +0900
committerGitHub <noreply@github.com>2020-02-07 02:23:38 -0500
commitc2986891f6aac87cec98232735945af756e6643f (patch)
tree716dc739f438bf740fa960b87fc022d569090802 /std/http/racing_server_test.ts
parentea6179f7dce89416f1586ee18c2f437e68eabd38 (diff)
remove non-null assertion operator from std (part1) (#3900)
Diffstat (limited to 'std/http/racing_server_test.ts')
-rw-r--r--std/http/racing_server_test.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/std/http/racing_server_test.ts b/std/http/racing_server_test.ts
index 8b7ff9829..27be0d79c 100644
--- a/std/http/racing_server_test.ts
+++ b/std/http/racing_server_test.ts
@@ -12,13 +12,14 @@ async function startServer(): Promise<void> {
stdout: "piped"
});
// Once racing server is ready it will write to its stdout.
- const r = new TextProtoReader(new BufReader(server.stdout!));
+ assert(server.stdout != null);
+ const r = new TextProtoReader(new BufReader(server.stdout));
const s = await r.readLine();
assert(s !== Deno.EOF && s.includes("Racing server listening..."));
}
function killServer(): void {
server.close();
- server.stdout!.close();
+ server.stdout?.close();
}
const input = `GET / HTTP/1.1