summaryrefslogtreecommitdiff
path: root/std/http
diff options
context:
space:
mode:
Diffstat (limited to 'std/http')
-rw-r--r--std/http/file_server_test.ts2
-rw-r--r--std/http/racing_server_test.ts4
-rw-r--r--std/http/server_test.ts8
3 files changed, 7 insertions, 7 deletions
diff --git a/std/http/file_server_test.ts b/std/http/file_server_test.ts
index dbbaf81ff..ceea566fa 100644
--- a/std/http/file_server_test.ts
+++ b/std/http/file_server_test.ts
@@ -5,7 +5,7 @@ import { TextProtoReader } from "../textproto/mod.ts";
import { ServerRequest } from "./server.ts";
import { serveFile } from "./file_server.ts";
const { test } = Deno;
-let fileServer: Deno.Process;
+let fileServer: Deno.Process<Deno.RunOptions & { stdout: "piped" }>;
type FileServerCfg = {
target?: string;
diff --git a/std/http/racing_server_test.ts b/std/http/racing_server_test.ts
index 845e5a490..054dfc385 100644
--- a/std/http/racing_server_test.ts
+++ b/std/http/racing_server_test.ts
@@ -3,7 +3,7 @@ import { BufReader, BufWriter } from "../io/bufio.ts";
import { TextProtoReader } from "../textproto/mod.ts";
const { connect, run, test } = Deno;
-let server: Deno.Process;
+let server: Deno.Process<Deno.RunOptions & { stdout: "piped" }>;
async function startServer(): Promise<void> {
server = run({
// TODO(lucacasonato): remove unstable when stabilized
@@ -18,7 +18,7 @@ async function startServer(): Promise<void> {
}
function killServer(): void {
server.close();
- server.stdout?.close();
+ server.stdout.close();
}
const input = [
diff --git a/std/http/server_test.ts b/std/http/server_test.ts
index d522b9a8f..2d911c450 100644
--- a/std/http/server_test.ts
+++ b/std/http/server_test.ts
@@ -372,7 +372,7 @@ test({
.catch((_): void => {}); // Ignores the error when closing the process.
try {
- const r = new TextProtoReader(new BufReader(p.stdout!));
+ const r = new TextProtoReader(new BufReader(p.stdout));
const s = await r.readLine();
assert(s !== null && s.includes("server listening"));
await delay(100);
@@ -387,7 +387,7 @@ test({
// Stops the sever and allows `p.status()` promise to resolve
Deno.kill(p.pid, Deno.Signal.SIGKILL);
await statusPromise;
- p.stdout!.close();
+ p.stdout.close();
p.close();
}
},
@@ -417,7 +417,7 @@ test({
.catch((_): void => {}); // Ignores the error when closing the process.
try {
- const r = new TextProtoReader(new BufReader(p.stdout!));
+ const r = new TextProtoReader(new BufReader(p.stdout));
const s = await r.readLine();
assert(
s !== null && s.includes("server listening"),
@@ -444,7 +444,7 @@ test({
// Stops the sever and allows `p.status()` promise to resolve
Deno.kill(p.pid, Deno.Signal.SIGKILL);
await statusPromise;
- p.stdout!.close();
+ p.stdout.close();
p.close();
}
},