summaryrefslogtreecommitdiff
path: root/std/http
diff options
context:
space:
mode:
Diffstat (limited to 'std/http')
-rw-r--r--std/http/file_server_test.ts10
-rw-r--r--std/http/io_test.ts10
-rw-r--r--std/http/racing_server_test.ts2
-rw-r--r--std/http/server_test.ts12
4 files changed, 17 insertions, 17 deletions
diff --git a/std/http/file_server_test.ts b/std/http/file_server_test.ts
index dc14d2c57..c377f3bda 100644
--- a/std/http/file_server_test.ts
+++ b/std/http/file_server_test.ts
@@ -50,7 +50,7 @@ test("file_server serveFile", async (): Promise<void> => {
}
});
-test(async function serveDirectory(): Promise<void> {
+test("serveDirectory", async function (): Promise<void> {
await startFileServer();
try {
const res = await fetch("http://localhost:4500/");
@@ -72,7 +72,7 @@ test(async function serveDirectory(): Promise<void> {
}
});
-test(async function serveFallback(): Promise<void> {
+test("serveFallback", async function (): Promise<void> {
await startFileServer();
try {
const res = await fetch("http://localhost:4500/badfile.txt");
@@ -85,7 +85,7 @@ test(async function serveFallback(): Promise<void> {
}
});
-test(async function serveWithUnorthodoxFilename(): Promise<void> {
+test("serveWithUnorthodoxFilename", async function (): Promise<void> {
await startFileServer();
try {
let res = await fetch("http://localhost:4500/http/testdata/%");
@@ -103,7 +103,7 @@ test(async function serveWithUnorthodoxFilename(): Promise<void> {
}
});
-test(async function servePermissionDenied(): Promise<void> {
+test("servePermissionDenied", async function (): Promise<void> {
const deniedServer = Deno.run({
cmd: [Deno.execPath(), "run", "--allow-net", "http/file_server.ts"],
stdout: "piped",
@@ -130,7 +130,7 @@ test(async function servePermissionDenied(): Promise<void> {
}
});
-test(async function printHelp(): Promise<void> {
+test("printHelp", async function (): Promise<void> {
const helpProcess = Deno.run({
cmd: [Deno.execPath(), "run", "http/file_server.ts", "--help"],
stdout: "piped",
diff --git a/std/http/io_test.ts b/std/http/io_test.ts
index 94c527e1b..0fe70730b 100644
--- a/std/http/io_test.ts
+++ b/std/http/io_test.ts
@@ -211,7 +211,7 @@ test("parseHttpVersion", (): void => {
}
});
-test(async function writeUint8ArrayResponse(): Promise<void> {
+test("writeUint8ArrayResponse", async function (): Promise<void> {
const shortText = "Hello";
const body = new TextEncoder().encode(shortText);
@@ -244,7 +244,7 @@ test(async function writeUint8ArrayResponse(): Promise<void> {
assertEquals(eof, Deno.EOF);
});
-test(async function writeStringResponse(): Promise<void> {
+test("writeStringResponse", async function (): Promise<void> {
const body = "Hello";
const res: Response = { body };
@@ -276,7 +276,7 @@ test(async function writeStringResponse(): Promise<void> {
assertEquals(eof, Deno.EOF);
});
-test(async function writeStringReaderResponse(): Promise<void> {
+test("writeStringReaderResponse", async function (): Promise<void> {
const shortText = "Hello";
const body = new StringReader(shortText);
@@ -344,7 +344,7 @@ test("writeResponse with trailer", async () => {
assertEquals(ret, exp);
});
-test(async function readRequestError(): Promise<void> {
+test("readRequestError", async function (): Promise<void> {
const input = `GET / HTTP/1.1
malformedHeader
`;
@@ -362,7 +362,7 @@ malformedHeader
// Ported from Go
// https://github.com/golang/go/blob/go1.12.5/src/net/http/request_test.go#L377-L443
// TODO(zekth) fix tests
-test(async function testReadRequestError(): Promise<void> {
+test("testReadRequestError", async function (): Promise<void> {
const testCases = [
{
in: "GET / HTTP/1.1\r\nheader: foo\r\n\r\n",
diff --git a/std/http/racing_server_test.ts b/std/http/racing_server_test.ts
index 037e91ef9..d80072e7d 100644
--- a/std/http/racing_server_test.ts
+++ b/std/http/racing_server_test.ts
@@ -58,7 +58,7 @@ content-length: 6
Step7
`;
-test(async function serverPipelineRace(): Promise<void> {
+test("serverPipelineRace", async function (): Promise<void> {
await startServer();
const conn = await connect({ port: 4501 });
diff --git a/std/http/server_test.ts b/std/http/server_test.ts
index d08c352c2..939e79600 100644
--- a/std/http/server_test.ts
+++ b/std/http/server_test.ts
@@ -54,7 +54,7 @@ const responseTests: ResponseTest[] = [
},
];
-test(async function responseWrite(): Promise<void> {
+test("responseWrite", async function (): Promise<void> {
for (const testCase of responseTests) {
const buf = new Buffer();
const bufw = new BufWriter(buf);
@@ -69,7 +69,7 @@ test(async function responseWrite(): Promise<void> {
}
});
-test(function requestContentLength(): void {
+test("requestContentLength", function (): void {
// Has content length
{
const req = new ServerRequest();
@@ -122,7 +122,7 @@ function totalReader(r: Deno.Reader): TotalReader {
},
};
}
-test(async function requestBodyWithContentLength(): Promise<void> {
+test("requestBodyWithContentLength", async function (): Promise<void> {
{
const req = new ServerRequest();
req.headers = new Headers();
@@ -191,7 +191,7 @@ test("ServerRequest.finalize() should consume unread body / chunked, trailers",
assertEquals(req.headers.get("deno"), "land");
assertEquals(req.headers.get("node"), "js");
});
-test(async function requestBodyWithTransferEncoding(): Promise<void> {
+test("requestBodyWithTransferEncoding", async function (): Promise<void> {
{
const shortText = "Hello";
const req = new ServerRequest();
@@ -240,7 +240,7 @@ test(async function requestBodyWithTransferEncoding(): Promise<void> {
}
});
-test(async function requestBodyReaderWithContentLength(): Promise<void> {
+test("requestBodyReaderWithContentLength", async function (): Promise<void> {
{
const shortText = "Hello";
const req = new ServerRequest();
@@ -283,7 +283,7 @@ test(async function requestBodyReaderWithContentLength(): Promise<void> {
}
});
-test(async function requestBodyReaderWithTransferEncoding(): Promise<void> {
+test("requestBodyReaderWithTransferEncoding", async function (): Promise<void> {
{
const shortText = "Hello";
const req = new ServerRequest();