LibJS: Ensure tests using the "ar" locale use the "arab" number system

In ICU 76, the default was changed from "arab" to "latn". See:
c149724509

The whole point of these tests was to use a non-Latin numbering system.
This patch ensures that is the case to make following patches easier to
grok.
This commit is contained in:
Timothy Flynn 2025-01-18 13:27:07 -05:00 committed by Tim Flynn
commit 0763997591
Notes: github-actions[bot] 2025-01-18 22:57:49 +00:00
11 changed files with 286 additions and 179 deletions

View file

@ -62,9 +62,11 @@ describe("normal behavior", () => {
test("with options", () => {
expect([12, 34].toLocaleString("en")).toBe("12,34");
expect([12, 34].toLocaleString("ar")).toBe("\u0661\u0662,\u0663\u0664");
expect([12, 34].toLocaleString("ar-u-nu-arab")).toBe("\u0661\u0662,\u0663\u0664");
expect([0.234].toLocaleString("en", { style: "percent" })).toBe("23%");
expect([0.234].toLocaleString("ar", { style: "percent" })).toBe("\u0662\u0663\u066a\u061c");
expect([0.234].toLocaleString("ar-u-nu-arab", { style: "percent" })).toBe(
"\u0662\u0663\u066a\u061c"
);
});
});