From 99de9eb4c2a78bf0efdcb5407bec76833dc459cd Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Fri, 17 Sep 2021 16:54:52 +1000 Subject: fix(cli): don't ignore diagnostics about for await (#12116) Fixes #12115 --- cli/tests/testdata/error_for_await.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 cli/tests/testdata/error_for_await.ts (limited to 'cli/tests/testdata/error_for_await.ts') diff --git a/cli/tests/testdata/error_for_await.ts b/cli/tests/testdata/error_for_await.ts new file mode 100644 index 000000000..6e8c5203f --- /dev/null +++ b/cli/tests/testdata/error_for_await.ts @@ -0,0 +1,14 @@ +const listener = Deno.listen({ port: 8080 }); + +for await (const conn of listener) { + handleConn(conn); +} + +function handleConn(conn: Deno.Conn) { + const httpConn = Deno.serveHttp(conn); + for await (const event of httpConn) { + event.respondWith(new Response("html", { status: 200 })); + } +} + +export {}; -- cgit v1.2.3