From 8178665bd1877a55a4e82b07d6ac4a749c8a9c1c Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 2 Sep 2022 19:38:06 +0800 Subject: fix(cli/repl): await Promise.any([])... (#15623) --- cli/tests/unit/console_test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'cli/tests/unit/console_test.ts') diff --git a/cli/tests/unit/console_test.ts b/cli/tests/unit/console_test.ts index 1b364eda1..1faef6bd7 100644 --- a/cli/tests/unit/console_test.ts +++ b/cli/tests/unit/console_test.ts @@ -2027,3 +2027,14 @@ Deno.test(function inspectStringAbbreviation() { '[ "This is a ..." ]', ); }); + +Deno.test(async function inspectAggregateError() { + try { + await Promise.any([]); + } catch (err) { + assertEquals( + Deno.inspect(err).trimEnd(), + "AggregateError: All promises were rejected", + ); + } +}); -- cgit v1.2.3