summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Tests
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2023-01-12 08:03:13 -0500
committerLinus Groh <mail@linusgroh.de>2023-01-14 19:12:48 +0000
commitd1881da2bed284ef5a7f9b9ac0d2ef8e3ffa3e65 (patch)
tree40c371e4599b2e6770fa9613042fb899d19ef920 /Userland/Libraries/LibJS/Tests
parent9b6fcd85913a7049041de6206aaa4cfcd535591c (diff)
downloadserenity-d1881da2bed284ef5a7f9b9ac0d2ef8e3ffa3e65.zip
LibJS: Set approximate number range format result's "source" to "shared"
This is a normative change in the Intl.NumberFormat v3 spec. See: https://github.com/tc39/proposal-intl-numberformat-v3/commit/7510e7f
Diffstat (limited to 'Userland/Libraries/LibJS/Tests')
-rw-r--r--Userland/Libraries/LibJS/Tests/builtins/Intl/NumberFormat/NumberFormat.prototype.formatRangeToParts.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/Userland/Libraries/LibJS/Tests/builtins/Intl/NumberFormat/NumberFormat.prototype.formatRangeToParts.js b/Userland/Libraries/LibJS/Tests/builtins/Intl/NumberFormat/NumberFormat.prototype.formatRangeToParts.js
index 3032d6ec7b..6c8271bffb 100644
--- a/Userland/Libraries/LibJS/Tests/builtins/Intl/NumberFormat/NumberFormat.prototype.formatRangeToParts.js
+++ b/Userland/Libraries/LibJS/Tests/builtins/Intl/NumberFormat/NumberFormat.prototype.formatRangeToParts.js
@@ -56,8 +56,8 @@ describe("correct behavior", () => {
test("approximately formatting", () => {
const en1 = new Intl.NumberFormat("en", { maximumFractionDigits: 0 });
expect(en1.formatRangeToParts(2.9, 3.1)).toEqual([
- { type: "approximatelySign", value: "~", source: "" },
- { type: "integer", value: "3", source: "" },
+ { type: "approximatelySign", value: "~", source: "shared" },
+ { type: "integer", value: "3", source: "shared" },
]);
const en2 = new Intl.NumberFormat("en", {
@@ -66,15 +66,15 @@ describe("correct behavior", () => {
maximumFractionDigits: 0,
});
expect(en2.formatRangeToParts(2.9, 3.1)).toEqual([
- { type: "approximatelySign", value: "~", source: "" },
- { type: "currency", value: "$", source: "" },
- { type: "integer", value: "3", source: "" },
+ { type: "approximatelySign", value: "~", source: "shared" },
+ { type: "currency", value: "$", source: "shared" },
+ { type: "integer", value: "3", source: "shared" },
]);
const ja1 = new Intl.NumberFormat("ja", { maximumFractionDigits: 0 });
expect(ja1.formatRangeToParts(2.9, 3.1)).toEqual([
- { type: "approximatelySign", value: "約", source: "" },
- { type: "integer", value: "3", source: "" },
+ { type: "approximatelySign", value: "約", source: "shared" },
+ { type: "integer", value: "3", source: "shared" },
]);
const ja2 = new Intl.NumberFormat("ja", {
@@ -83,9 +83,9 @@ describe("correct behavior", () => {
maximumFractionDigits: 0,
});
expect(ja2.formatRangeToParts(2.9, 3.1)).toEqual([
- { type: "approximatelySign", value: "約", source: "" },
- { type: "currency", value: "¥", source: "" },
- { type: "integer", value: "3", source: "" },
+ { type: "approximatelySign", value: "約", source: "shared" },
+ { type: "currency", value: "¥", source: "shared" },
+ { type: "integer", value: "3", source: "shared" },
]);
});