@uxf/localize 11.45.0 → 11.46.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
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const data_1 = require("../utils/data");
|
|
4
|
+
const get_currency_symbol_1 = require("./get-currency-symbol");
|
|
5
|
+
describe("getCurrencySymbol", () => {
|
|
6
|
+
it("should return the correct symbol for a given currency", () => {
|
|
7
|
+
const currency = "USD";
|
|
8
|
+
const result = (0, get_currency_symbol_1.getCurrencySymbol)(currency);
|
|
9
|
+
expect(result).toBe(data_1.CURRENCIES[currency].symbol);
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const curry_1 = require("./curry");
|
|
4
|
+
describe("_curry", () => {
|
|
5
|
+
it("should curry a function with two arguments", () => {
|
|
6
|
+
const add = (a, b) => a + b;
|
|
7
|
+
const curriedAdd = (0, curry_1._curry)(add);
|
|
8
|
+
const addFive = curriedAdd(5);
|
|
9
|
+
const result = addFive(10);
|
|
10
|
+
expect(result).toBe(15);
|
|
11
|
+
});
|
|
12
|
+
it("should curry a function with more than two arguments", () => {
|
|
13
|
+
const multiply = (a, b, c) => a * b * c;
|
|
14
|
+
const curriedMultiply = (0, curry_1._curry)(multiply);
|
|
15
|
+
const multiplyByTwo = curriedMultiply(2);
|
|
16
|
+
const curriedMultiplyByTwo = (0, curry_1._curry)(multiplyByTwo);
|
|
17
|
+
const multiplyByTwoAndThree = curriedMultiplyByTwo(3);
|
|
18
|
+
const result = multiplyByTwoAndThree(4);
|
|
19
|
+
expect(result).toBe(24);
|
|
20
|
+
});
|
|
21
|
+
});
|