diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-02-08 21:24:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-08 14:24:09 -0600 |
commit | 1c0ffa138355c7eb90fd5d3c01f799245636bcc0 (patch) | |
tree | d0580d0cece8ba87548c33064bcb811630beb007 /std | |
parent | a4bb8bab44cc778e6e455f19fdae9f3e4acc809b (diff) |
reenable server tests (#3928)
Diffstat (limited to 'std')
-rw-r--r-- | std/http/server_test.ts | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/std/http/server_test.ts b/std/http/server_test.ts index 31e68eb1a..c14d63145 100644 --- a/std/http/server_test.ts +++ b/std/http/server_test.ts @@ -6,12 +6,14 @@ // https://github.com/golang/go/blob/master/src/net/http/responsewrite_test.go const { Buffer } = Deno; +import { TextProtoReader } from "../textproto/mod.ts"; import { test, runIfMain } from "../testing/mod.ts"; import { assert, assertEquals, assertNotEquals } from "../testing/asserts.ts"; import { Response, ServerRequest, writeResponse, + serve, readRequest, parseHTTPVersion } from "./server.ts"; @@ -21,6 +23,7 @@ import { ReadLineResult, UnexpectedEOFError } from "../io/bufio.ts"; +import { delay, deferred } from "../util/async.ts"; import { StringReader } from "../io/readers.ts"; function assertNotEOF<T extends {}>(val: T | Deno.EOF): T { @@ -564,7 +567,6 @@ test({ } }); -/* TODO(bartlomieju): after removing std/installer/ it hangs, fix and reenable test({ name: "[http] destroyed connection", async fn(): Promise<void> { @@ -603,9 +605,7 @@ test({ } } }); -*/ -/* TODO(bartlomieju): after removing std/installer/ it hangs, fix and reenable test({ name: "[http] serveTLS", async fn(): Promise<void> { @@ -654,9 +654,7 @@ test({ } } }); -*/ -/* TODO(bartlomieju): after removing std/installer/ it hangs, fix and reenable test({ name: "[http] close server while iterating", async fn(): Promise<void> { @@ -669,7 +667,6 @@ test({ assertEquals(await nextAfterClosing, { value: undefined, done: true }); } }); -*/ // TODO(kevinkassimo): create a test that works on Windows. // The following test is to ensure that if an error occurs during respond @@ -678,7 +675,6 @@ test({ // receive a RST and thus trigger an error during response for us to test. // We need to find a way to similarly trigger an error on Windows so that // we can test if connection is closed. -/* TODO(bartlomieju): after removing std/installer/ it hangs, fix and reenable if (Deno.build.os !== "win") { test({ name: "[http] respond error handling", @@ -736,5 +732,5 @@ if (Deno.build.os !== "win") { } }); } -*/ + runIfMain(import.meta); |