summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorLeo Kettmeir <crowlkats@toaxl.com>2024-08-01 09:45:05 -0700
committerGitHub <noreply@github.com>2024-08-01 09:45:05 -0700
commit6db5f1bb6e3913381ffed206dce4a5cde14fa772 (patch)
tree4f2d1a36a37b1537b9cad59cd1f336c57f90ab0d /tests/unit
parent4eda9e64e9fd6075b74742ae877281ee4a7ab155 (diff)
fix(ext/console): render properties of Intl.Locale (#24827)
Fixes #21271 --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/console_test.ts18
1 files changed, 18 insertions, 0 deletions
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], " <rejected> 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](