diff options
Diffstat (limited to 'std/io/readers_test.ts')
-rw-r--r-- | std/io/readers_test.ts | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/std/io/readers_test.ts b/std/io/readers_test.ts index 04e9b7488..d608877c1 100644 --- a/std/io/readers_test.ts +++ b/std/io/readers_test.ts @@ -1,11 +1,10 @@ -const { copy, test } = Deno; import { assertEquals } from "../testing/asserts.ts"; import { LimitedReader, MultiReader, StringReader } from "./readers.ts"; import { StringWriter } from "./writers.ts"; import { copyN } from "./ioutil.ts"; import { decode } from "../encoding/utf8.ts"; -test("ioStringReader", async function (): Promise<void> { +Deno.test("ioStringReader", async function (): Promise<void> { const r = new StringReader("abcdef"); const res0 = await r.read(new Uint8Array(6)); assertEquals(res0, 6); @@ -13,7 +12,7 @@ test("ioStringReader", async function (): Promise<void> { assertEquals(res1, null); }); -test("ioStringReader", async function (): Promise<void> { +Deno.test("ioStringReader", async function (): Promise<void> { const r = new StringReader("abcdef"); const buf = new Uint8Array(3); const res1 = await r.read(buf); @@ -27,17 +26,17 @@ test("ioStringReader", async function (): Promise<void> { assertEquals(decode(buf), "def"); }); -test("ioMultiReader", async function (): Promise<void> { +Deno.test("ioMultiReader", async function (): Promise<void> { const r = new MultiReader(new StringReader("abc"), new StringReader("def")); const w = new StringWriter(); const n = await copyN(r, w, 4); assertEquals(n, 4); assertEquals(w.toString(), "abcd"); - await copy(r, w); + await Deno.copy(r, w); assertEquals(w.toString(), "abcdef"); }); -test("ioLimitedReader", async function (): Promise<void> { +Deno.test("ioLimitedReader", async function (): Promise<void> { let sr = new StringReader("abc"); let r = new LimitedReader(sr, 2); let buffer = await Deno.readAll(r); @@ -55,7 +54,7 @@ test("ioLimitedReader", async function (): Promise<void> { assertEquals((await Deno.readAll(r)).length, 0); }); -test("ioLimitedReader", async function (): Promise<void> { +Deno.test("ioLimitedReader", async function (): Promise<void> { const rb = new StringReader("abc"); const wb = new StringWriter(); await Deno.copy(new LimitedReader(rb, -1), wb); |