From 73e89844bab930f2a2821b059743faed8372ed14 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Tue, 20 Sep 2022 07:00:01 +1000 Subject: feat(cli): update to TypeScript 4.8 (#15064) --- cli/tests/unit/console_test.ts | 2 +- cli/tests/unit/http_test.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'cli/tests/unit') diff --git a/cli/tests/unit/console_test.ts b/cli/tests/unit/console_test.ts index 1faef6bd7..ad7c0caa7 100644 --- a/cli/tests/unit/console_test.ts +++ b/cli/tests/unit/console_test.ts @@ -1918,7 +1918,7 @@ Deno.test(function inspectErrorCircular() { cause: new Error("This is a cause error"), }); error1.cause = error1; - assert(error2.cause); + assert(error2.cause instanceof Error); error2.cause.cause = error2; assertStringIncludes( diff --git a/cli/tests/unit/http_test.ts b/cli/tests/unit/http_test.ts index eeb75c934..3de93076e 100644 --- a/cli/tests/unit/http_test.ts +++ b/cli/tests/unit/http_test.ts @@ -1214,7 +1214,9 @@ Deno.test( async function client() { const socket = new WebSocket(`ws://${hostname}:${port}/`); socket.onopen = () => socket.send("bla bla"); - const { data } = await new Promise((res) => socket.onmessage = res); + const { data } = await new Promise>((res) => + socket.onmessage = res + ); assertStrictEquals(data, "bla bla"); socket.close(); } -- cgit v1.2.3