diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2021-01-18 10:40:39 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-18 10:40:39 +1100 |
commit | 2077864a8deca240fbbd43758e30977cc881e110 (patch) | |
tree | 67e93e98597df9c6bc9001900071be963ede49c3 /cli/tests/unit/streams_deprecated.ts | |
parent | 81d73f2987c65463c0f2653f31d3d29d8db1986c (diff) |
fix(op_crate/fetch): add back ReadableStream.getIterator and deprecate (#9146)
Diffstat (limited to 'cli/tests/unit/streams_deprecated.ts')
-rw-r--r-- | cli/tests/unit/streams_deprecated.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cli/tests/unit/streams_deprecated.ts b/cli/tests/unit/streams_deprecated.ts new file mode 100644 index 000000000..77750072c --- /dev/null +++ b/cli/tests/unit/streams_deprecated.ts @@ -0,0 +1,16 @@ +// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. +import { assertEquals, unitTest } from "./test_util.ts"; + +unitTest(async function symlinkSyncPerm() { + const rs = new ReadableStream<string>({ + start(controller) { + controller.enqueue("hello "); + controller.enqueue("deno"); + controller.close(); + }, + }); + + for await (const chunk of rs.getIterator()) { + assertEquals(typeof chunk, "string"); + } +}); |