diff options
author | Samrith Shankar <samrith-s@users.noreply.github.com> | 2020-03-20 14:38:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-20 09:38:34 -0400 |
commit | 798904b0f2ed0c7284b67bba2f125f406b5850de (patch) | |
tree | 5aba8d35aa8984aa778c894258bcaed56f1ce17c /std/util/async_test.ts | |
parent | 35f6e2e45ddb96524a6bdf54b0a6155caa88d5e0 (diff) |
Add require-await lint rule (#4401)
Diffstat (limited to 'std/util/async_test.ts')
-rw-r--r-- | std/util/async_test.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/std/util/async_test.ts b/std/util/async_test.ts index 4607cf6cd..d81b52b43 100644 --- a/std/util/async_test.ts +++ b/std/util/async_test.ts @@ -3,17 +3,20 @@ const { test } = Deno; import { assert, assertEquals, assertStrictEq } from "../testing/asserts.ts"; import { collectUint8Arrays, deferred, MuxAsyncIterator } from "./async.ts"; -test(async function asyncDeferred(): Promise<void> { +test(function asyncDeferred(): Promise<void> { const d = deferred<number>(); d.resolve(12); + return Promise.resolve(); }); +// eslint-disable-next-line require-await async function* gen123(): AsyncIterableIterator<number> { yield 1; yield 2; yield 3; } +// eslint-disable-next-line require-await async function* gen456(): AsyncIterableIterator<number> { yield 4; yield 5; @@ -47,6 +50,7 @@ test(async function collectUint8Arrays0(): Promise<void> { test(async function collectUint8Arrays1(): Promise<void> { const buf = new Uint8Array([1, 2, 3]); + // eslint-disable-next-line require-await async function* gen(): AsyncIterableIterator<Uint8Array> { yield buf; } @@ -56,6 +60,7 @@ test(async function collectUint8Arrays1(): Promise<void> { }); test(async function collectUint8Arrays4(): Promise<void> { + // eslint-disable-next-line require-await async function* gen(): AsyncIterableIterator<Uint8Array> { yield new Uint8Array([1, 2, 3]); yield new Uint8Array([]); |