From 798904b0f2ed0c7284b67bba2f125f406b5850de Mon Sep 17 00:00:00 2001 From: Samrith Shankar Date: Fri, 20 Mar 2020 14:38:34 +0100 Subject: Add require-await lint rule (#4401) --- std/util/async_test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'std/util/async_test.ts') 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 { +test(function asyncDeferred(): Promise { const d = deferred(); d.resolve(12); + return Promise.resolve(); }); +// eslint-disable-next-line require-await async function* gen123(): AsyncIterableIterator { yield 1; yield 2; yield 3; } +// eslint-disable-next-line require-await async function* gen456(): AsyncIterableIterator { yield 4; yield 5; @@ -47,6 +50,7 @@ test(async function collectUint8Arrays0(): Promise { test(async function collectUint8Arrays1(): Promise { const buf = new Uint8Array([1, 2, 3]); + // eslint-disable-next-line require-await async function* gen(): AsyncIterableIterator { yield buf; } @@ -56,6 +60,7 @@ test(async function collectUint8Arrays1(): Promise { }); test(async function collectUint8Arrays4(): Promise { + // eslint-disable-next-line require-await async function* gen(): AsyncIterableIterator { yield new Uint8Array([1, 2, 3]); yield new Uint8Array([]); -- cgit v1.2.3