diff options
author | Luca Casonato <lucacasonato@yahoo.com> | 2021-04-06 00:05:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-06 00:05:36 +0200 |
commit | da60e2afcbd4b28e3b8ba69b5e38d4ff173ddbe1 (patch) | |
tree | 616031ffcb358a1ff3168a96bc95512f3648ff9f /cli/tests/unit/fetch_test.ts | |
parent | 2aed322dd507a8568b6ee6f4897e9a8e3220f763 (diff) |
chore: deprecate Deno.Buffer and read/write utils (#9793)
This commit marks the `Deno.Buffer` / `Deno.readAll` /
`Deno.readAllSync` / `Deno.writeAll` / `Deno.writeAllSync` utils as
deprecated, and schedules them for removal in Deno 2.0. These
utilities are implemented in pure JS, so should not be part of the
Deno namespace.
These utilities are now available in std/io/buffer and std/io/util:
https://github.com/denoland/deno_std/pull/808.
This additionallty removes all internal dependance on Deno.Buffer.
Diffstat (limited to 'cli/tests/unit/fetch_test.ts')
-rw-r--r-- | cli/tests/unit/fetch_test.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/tests/unit/fetch_test.ts b/cli/tests/unit/fetch_test.ts index fa013f0c5..6ece3c835 100644 --- a/cli/tests/unit/fetch_test.ts +++ b/cli/tests/unit/fetch_test.ts @@ -2,12 +2,12 @@ import { assert, assertEquals, - assertThrows, assertThrowsAsync, fail, unimplemented, unitTest, } from "./test_util.ts"; +import { Buffer } from "../../../test_util/std/io/buffer.ts"; unitTest({ perms: { net: true } }, async function fetchProtocolError(): Promise< void @@ -613,13 +613,13 @@ unitTest({ perms: { net: true } }, async function fetchUserAgent(): Promise< // at Object.assertEquals (file:///C:/deno/js/testing/util.ts:29:11) // at fetchPostBodyString (file -function bufferServer(addr: string): Deno.Buffer { +function bufferServer(addr: string): Buffer { const [hostname, port] = addr.split(":"); const listener = Deno.listen({ hostname, port: Number(port), }) as Deno.Listener; - const buf = new Deno.Buffer(); + const buf = new Buffer(); listener.accept().then(async (conn: Deno.Conn) => { const p1 = buf.readFrom(conn); const p2 = conn.write( |