From 6db5f1bb6e3913381ffed206dce4a5cde14fa772 Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Thu, 1 Aug 2024 09:45:05 -0700 Subject: fix(ext/console): render properties of Intl.Locale (#24827) Fixes #21271 --------- Co-authored-by: Yoshiya Hinosawa --- tests/unit/console_test.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests') diff --git a/tests/unit/console_test.ts b/tests/unit/console_test.ts index d9ac71dd8..c13362419 100644 --- a/tests/unit/console_test.ts +++ b/tests/unit/console_test.ts @@ -1066,6 +1066,24 @@ Deno.test(async function consoleTestStringifyPromises() { assertEquals(strLines[1], " Error: Whoops"); }); +Deno.test(function consoleTestStringifyIntlLocale() { + assertEquals( + stringify(new Intl.Locale("zh-Hant-TW", { hourCycle: "h12" })), + `Locale [Intl.Locale] { + baseName: "zh-Hant-TW", + calendar: undefined, + caseFirst: undefined, + collation: undefined, + hourCycle: "h12", + language: "zh", + numberingSystem: undefined, + numeric: false, + region: "TW", + script: "Hant" +}`, + ); +}); + Deno.test(function consoleTestWithCustomInspector() { class A { [customInspect]( -- cgit v1.2.3