std/io/multi_reader_test.ts
Asher Gomez 548d254f31
BREAKING(io/unstable): remove copyN() (#5999)
* deprecation(io/unstable): deprecate `copyN()`

* BREAKING(io/unstable): remove `copyN()`
2024-09-25 12:50:38 +09:00

15 lines
530 B
TypeScript

// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { assertEquals } from "@std/assert";
import { MultiReader } from "./multi_reader.ts";
import { StringWriter } from "./string_writer.ts";
import { copy } from "./copy.ts";
import { StringReader } from "./string_reader.ts";
Deno.test("ioMultiReader", async function () {
const r = new MultiReader([new StringReader("abc"), new StringReader("def")]);
const w = new StringWriter();
await copy(r, w);
assertEquals(w.toString(), "abcdef");
});