diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/tests/unit/streams_deprecated.ts | 16 | ||||
-rw-r--r-- | cli/tests/unit/unit_tests.ts | 1 |
2 files changed, 17 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"); + } +}); diff --git a/cli/tests/unit/unit_tests.ts b/cli/tests/unit/unit_tests.ts index 69eaac3ed..8af28c1bb 100644 --- a/cli/tests/unit/unit_tests.ts +++ b/cli/tests/unit/unit_tests.ts @@ -57,6 +57,7 @@ import "./response_test.ts"; import "./signal_test.ts"; import "./stat_test.ts"; import "./stdio_test.ts"; +import "./streams_deprecated.ts"; import "./symlink_test.ts"; import "./sync_test.ts"; import "./text_encoding_test.ts"; |