deno.land / std@0.224.0 / io / read_all_test.ts
1234567891011121314151617181920212223// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { assert, assertEquals } from "../assert/mod.ts";import { readAll, readAllSync } from "./read_all.ts";import { Buffer } from "./buffer.ts";import { init } from "./_test_common.ts";
Deno.test("readAll()", async () => { const testBytes = init(); assert(testBytes); const reader = new Buffer(testBytes.buffer); const actualBytes = await readAll(reader); assertEquals(testBytes, actualBytes);});
Deno.test("readAllSync()", () => { const testBytes = init(); assert(testBytes); const reader = new Buffer(testBytes.buffer); const actualBytes = readAllSync(reader); assertEquals(testBytes, actualBytes);});
Version Info