mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
chore(runtime): deprecate Deno.copy
(#11369)
This commit is contained in:
parent
00484d24ba
commit
51e0bfda3c
10 changed files with 29 additions and 15 deletions
|
@ -8,6 +8,7 @@ import {
|
|||
assertThrowsAsync,
|
||||
unitTest,
|
||||
} from "./test_util.ts";
|
||||
import { copy } from "../../../test_util/std/io/util.ts";
|
||||
|
||||
unitTest(function filesStdioFileDescriptors(): void {
|
||||
assertEquals(Deno.stdin.rid, 0);
|
||||
|
@ -21,7 +22,7 @@ unitTest({ perms: { read: true } }, async function filesCopyToStdout(): Promise<
|
|||
const filename = "cli/tests/fixture.json";
|
||||
const file = await Deno.open(filename);
|
||||
assert(file.rid > 2);
|
||||
const bytesWritten = await Deno.copy(file, Deno.stdout);
|
||||
const bytesWritten = await copy(file, Deno.stdout);
|
||||
const fileSize = Deno.statSync(filename).size;
|
||||
assertEquals(bytesWritten, fileSize);
|
||||
file.close();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue