@messagevisor/catalog 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/node/index.spec.ts +8 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@messagevisor/catalog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Static catalog UI for Messagevisor projects",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"typescript": "^5.7.2",
|
|
58
58
|
"vite": "^6.0.7"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "3f73190a4fee0904433950eca22154a4b5b34169"
|
|
61
61
|
}
|
package/src/node/index.spec.ts
CHANGED
|
@@ -72,6 +72,8 @@ async function createProject() {
|
|
|
72
72
|
"direction: ltr",
|
|
73
73
|
"formats:",
|
|
74
74
|
" number:",
|
|
75
|
+
" decimal:",
|
|
76
|
+
" maximumFractionDigits: 2",
|
|
75
77
|
" money:",
|
|
76
78
|
" style: currency",
|
|
77
79
|
" currency: USD",
|
|
@@ -270,19 +272,16 @@ describe("catalog", function () {
|
|
|
270
272
|
"web",
|
|
271
273
|
]);
|
|
272
274
|
expect(index.entities.target.find((entry: any) => entry.key === "web").messageCount).toBe(2);
|
|
273
|
-
expect(locale.computedFormats.number.
|
|
274
|
-
|
|
275
|
-
currency: "USD",
|
|
276
|
-
currencyDisplay: "code",
|
|
277
|
-
});
|
|
275
|
+
expect(locale.computedFormats.number.decimal).toEqual({ maximumFractionDigits: 2 });
|
|
276
|
+
expect(locale.computedFormats.number.money).toEqual({ currencyDisplay: "code" });
|
|
278
277
|
expect(locale.entity.examples).toHaveLength(1);
|
|
279
278
|
expect(locale.entity.direction).toBe("ltr");
|
|
280
279
|
expect(locale.entity.promotable).toBe(false);
|
|
281
280
|
expect(locale.formatRows).toEqual(
|
|
282
281
|
expect.arrayContaining([
|
|
283
282
|
expect.objectContaining({
|
|
284
|
-
path: "number.
|
|
285
|
-
value:
|
|
283
|
+
path: "number.decimal.maximumFractionDigits",
|
|
284
|
+
value: 2,
|
|
286
285
|
source: "inherited",
|
|
287
286
|
from: "en",
|
|
288
287
|
examplePreview: expect.any(String),
|
|
@@ -357,8 +356,8 @@ describe("catalog", function () {
|
|
|
357
356
|
examplePreview: expect.any(String),
|
|
358
357
|
}),
|
|
359
358
|
expect.objectContaining({
|
|
360
|
-
path: "number.
|
|
361
|
-
value:
|
|
359
|
+
path: "number.decimal.maximumFractionDigits",
|
|
360
|
+
value: 2,
|
|
362
361
|
source: "inherited",
|
|
363
362
|
from: "en",
|
|
364
363
|
examplePreview: expect.any(String),
|