diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-06-12 20:23:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 15:23:38 -0400 |
commit | 1fff6f55c3ba98a10018c6d374795e612061e9b6 (patch) | |
tree | 12074b6d44736b11513d857e437f9e30a6bf65a4 /std/textproto/test.ts | |
parent | 26bf56afdaf16634ffbaa23684faf3a44cc10f62 (diff) |
refactor: Don't destructure the Deno namespace (#6268)
Diffstat (limited to 'std/textproto/test.ts')
-rw-r--r-- | std/textproto/test.ts | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/std/textproto/test.ts b/std/textproto/test.ts index 7539e9779..a7109410b 100644 --- a/std/textproto/test.ts +++ b/std/textproto/test.ts @@ -2,18 +2,16 @@ // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. - import { BufReader } from "../io/bufio.ts"; import { TextProtoReader } from "./mod.ts"; import { StringReader } from "../io/readers.ts"; import { assert, assertEquals, assertThrows } from "../testing/asserts.ts"; -const { test } = Deno; function reader(s: string): TextProtoReader { return new TextProtoReader(new BufReader(new StringReader(s))); } -test({ +Deno.test({ ignore: true, name: "[textproto] Reader : DotBytes", fn(): Promise<void> { @@ -23,13 +21,13 @@ test({ }, }); -test("[textproto] ReadEmpty", async () => { +Deno.test("[textproto] ReadEmpty", async () => { const r = reader(""); const m = await r.readMIMEHeader(); assertEquals(m, null); }); -test("[textproto] Reader", async () => { +Deno.test("[textproto] Reader", async () => { const r = reader("line1\nline2\n"); let s = await r.readLine(); assertEquals(s, "line1"); @@ -41,7 +39,7 @@ test("[textproto] Reader", async () => { assert(s === null); }); -test({ +Deno.test({ name: "[textproto] Reader : MIME Header", async fn(): Promise<void> { const input = @@ -55,7 +53,7 @@ test({ }, }); -test({ +Deno.test({ name: "[textproto] Reader : MIME Header Single", async fn(): Promise<void> { const input = "Foo: bar\n\n"; @@ -66,7 +64,7 @@ test({ }, }); -test({ +Deno.test({ name: "[textproto] Reader : MIME Header No Key", async fn(): Promise<void> { const input = ": bar\ntest-1: 1\n\n"; @@ -77,7 +75,7 @@ test({ }, }); -test({ +Deno.test({ name: "[textproto] Reader : Large MIME Header", async fn(): Promise<void> { const data: string[] = []; @@ -95,7 +93,7 @@ test({ // Test that we don't read MIME headers seen in the wild, // with spaces before colons, and spaces in keys. -test({ +Deno.test({ name: "[textproto] Reader : MIME Header Non compliant", async fn(): Promise<void> { const input = @@ -119,7 +117,7 @@ test({ }, }); -test({ +Deno.test({ name: "[textproto] Reader : MIME Header Malformed", async fn(): Promise<void> { const input = [ @@ -142,7 +140,7 @@ test({ }, }); -test({ +Deno.test({ name: "[textproto] Reader : MIME Header Trim Continued", async fn(): Promise<void> { const input = @@ -164,7 +162,7 @@ test({ }, }); -test({ +Deno.test({ name: "[textproto] #409 issue : multipart form boundary", async fn(): Promise<void> { const input = [ @@ -181,7 +179,7 @@ test({ }, }); -test({ +Deno.test({ name: "[textproto] #4521 issue", async fn() { const input = "abcdefghijklmnopqrstuvwxyz"; |