summaryrefslogtreecommitdiff
path: root/std/http
diff options
context:
space:
mode:
Diffstat (limited to 'std/http')
-rw-r--r--std/http/cookie_test.ts7
-rw-r--r--std/http/file_server_test.ts4
-rw-r--r--std/http/racing_server_test.ts5
-rw-r--r--std/http/server_test.ts5
4 files changed, 6 insertions, 15 deletions
diff --git a/std/http/cookie_test.ts b/std/http/cookie_test.ts
index 5f51a6d32..5e29fede7 100644
--- a/std/http/cookie_test.ts
+++ b/std/http/cookie_test.ts
@@ -2,9 +2,8 @@
import { ServerRequest, Response } from "./server.ts";
import { getCookies, delCookie, setCookie } from "./cookie.ts";
import { assert, assertEquals } from "../testing/asserts.ts";
-import { test } from "../testing/mod.ts";
-test({
+Deno.test({
name: "[HTTP] Cookie parser",
fn(): void {
const req = new ServerRequest();
@@ -32,7 +31,7 @@ test({
}
});
-test({
+Deno.test({
name: "[HTTP] Cookie Delete",
fn(): void {
const res: Response = {};
@@ -44,7 +43,7 @@ test({
}
});
-test({
+Deno.test({
name: "[HTTP] Cookie Set",
fn(): void {
const res: Response = {};
diff --git a/std/http/file_server_test.ts b/std/http/file_server_test.ts
index 099723b87..ba625b7c8 100644
--- a/std/http/file_server_test.ts
+++ b/std/http/file_server_test.ts
@@ -1,8 +1,8 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { test, runIfMain } from "../testing/mod.ts";
import { assert, assertEquals, assertStrContains } from "../testing/asserts.ts";
import { BufReader } from "../io/bufio.ts";
import { TextProtoReader } from "../textproto/mod.ts";
+const { test } = Deno;
let fileServer: Deno.Process;
@@ -135,5 +135,3 @@ test(async function printHelp(): Promise<void> {
helpProcess.close();
helpProcess.stdout.close();
});
-
-runIfMain(import.meta);
diff --git a/std/http/racing_server_test.ts b/std/http/racing_server_test.ts
index 27be0d79c..639935339 100644
--- a/std/http/racing_server_test.ts
+++ b/std/http/racing_server_test.ts
@@ -1,6 +1,5 @@
const { connect, run } = Deno;
-import { test, runIfMain } from "../testing/mod.ts";
import { assert, assertEquals } from "../testing/asserts.ts";
import { BufReader } from "../io/bufio.ts";
import { TextProtoReader } from "../textproto/mod.ts";
@@ -48,7 +47,7 @@ content-length: 8
World 4
`;
-test(async function serverPipelineRace(): Promise<void> {
+Deno.test(async function serverPipelineRace(): Promise<void> {
await startServer();
const conn = await connect({ port: 4501 });
@@ -62,5 +61,3 @@ test(async function serverPipelineRace(): Promise<void> {
}
killServer();
});
-
-runIfMain(import.meta);
diff --git a/std/http/server_test.ts b/std/http/server_test.ts
index 10b0fec20..a18cd273c 100644
--- a/std/http/server_test.ts
+++ b/std/http/server_test.ts
@@ -5,9 +5,8 @@
// Ported from
// https://github.com/golang/go/blob/master/src/net/http/responsewrite_test.go
-const { Buffer } = Deno;
+const { Buffer, test } = Deno;
import { TextProtoReader } from "../textproto/mod.ts";
-import { test, runIfMain } from "../testing/mod.ts";
import {
assert,
assertEquals,
@@ -820,5 +819,3 @@ test("writeTrailer should throw", async () => {
"Not trailer"
);
});
-
-runIfMain(import.meta);