diff options
Diffstat (limited to 'http')
| -rwxr-xr-x | http/file_server.ts | 3 | ||||
| -rw-r--r-- | http/file_server_test.ts | 2 | ||||
| -rw-r--r-- | http/server.ts | 3 | ||||
| -rw-r--r-- | http/server_test.ts | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/http/file_server.ts b/http/file_server.ts index 1f3fdd586..20ad45be6 100755 --- a/http/file_server.ts +++ b/http/file_server.ts @@ -6,13 +6,14 @@ // TODO Add tests like these: // https://github.com/indexzero/http-server/blob/master/test/http-server-test.js +const { ErrorKind, cwd, args, stat, readDir, open } = Deno; +import { DenoError } from "deno"; import { listenAndServe, ServerRequest, setContentLength, Response } from "./server.ts"; -import { cwd, DenoError, ErrorKind, args, stat, readDir, open } from "deno"; import { extname } from "../fs/path.ts"; import { contentType } from "../media_types/mod.ts"; diff --git a/http/file_server_test.ts b/http/file_server_test.ts index 698857dce..cf4b8dcbd 100644 --- a/http/file_server_test.ts +++ b/http/file_server_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -import { readFile, run } from "deno"; +const { readFile, run } = Deno; import { test, assert, assertEqual } from "../testing/mod.ts"; import { BufReader } from "../io/bufio.ts"; diff --git a/http/server.ts b/http/server.ts index 400171fc5..c6cd95f86 100644 --- a/http/server.ts +++ b/http/server.ts @@ -1,5 +1,6 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -import { listen, Conn, toAsyncIterator, Reader, Writer, copy } from "deno"; +const { listen, toAsyncIterator, copy } = Deno; +import { Conn, Reader, Writer } from "deno"; import { BufReader, BufState, BufWriter } from "../io/bufio.ts"; import { TextProtoReader } from "../textproto/mod.ts"; import { STATUS_TEXT } from "./http_status.ts"; diff --git a/http/server_test.ts b/http/server_test.ts index 099547d0c..cc5863eb5 100644 --- a/http/server_test.ts +++ b/http/server_test.ts @@ -5,7 +5,7 @@ // Ported from // https://github.com/golang/go/blob/master/src/net/http/responsewrite_test.go -import { Buffer } from "deno"; +const { Buffer } = Deno; import { assertEqual, test } from "../testing/mod.ts"; import { Response, ServerRequest } from "./server.ts"; import { BufReader, BufWriter } from "../io/bufio.ts"; |
