From 6abf126c2a7a451cded8c6b5e6ddf1b69c84055d Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Tue, 2 Feb 2021 19:05:46 +0800 Subject: chore: remove std directory (#9361) This removes the std folder from the tree. Various parts of the tests are pretty tightly dependent on std (47 direct imports and 75 indirect imports, not counting the cli tests that use them as fixtures) so I've added std as a submodule for now. --- std/async/mux_async_iterator_test.ts | 50 ------------------------------------ 1 file changed, 50 deletions(-) delete mode 100644 std/async/mux_async_iterator_test.ts (limited to 'std/async/mux_async_iterator_test.ts') diff --git a/std/async/mux_async_iterator_test.ts b/std/async/mux_async_iterator_test.ts deleted file mode 100644 index e1bdb47b4..000000000 --- a/std/async/mux_async_iterator_test.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -import { assertEquals, assertThrowsAsync } from "../testing/asserts.ts"; -import { MuxAsyncIterator } from "./mux_async_iterator.ts"; - -async function* gen123(): AsyncIterableIterator { - yield 1; - yield 2; - yield 3; -} - -async function* gen456(): AsyncIterableIterator { - yield 4; - yield 5; - yield 6; -} - -async function* genThrows(): AsyncIterableIterator { - yield 7; - throw new Error("something went wrong"); -} - -Deno.test("[async] MuxAsyncIterator", async function (): Promise { - const mux = new MuxAsyncIterator(); - mux.add(gen123()); - mux.add(gen456()); - const results = new Set(); - for await (const value of mux) { - results.add(value); - } - assertEquals(results.size, 6); -}); - -Deno.test({ - name: "[async] MuxAsyncIterator throws", - async fn() { - const mux = new MuxAsyncIterator(); - mux.add(gen123()); - mux.add(genThrows()); - const results = new Set(); - await assertThrowsAsync( - async () => { - for await (const value of mux) { - results.add(value); - } - }, - Error, - "something went wrong", - ); - }, -}); -- cgit v1.2.3