Skip to content

Commit 025578a

Browse files
alex-okrushkobrandonroberts
authored andcommitted
build: push node version up and refactor test (#2190)
1 parent 0bb23fe commit 025578a

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

modules/store/spec/utils.spec.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,21 @@ describe(`Store utils`, () => {
5757

5858
describe(`compose()`, () => {
5959
const cube = (n: number) => Math.pow(n, 3);
60-
const precision = (n: number) => parseFloat(n.toPrecision(12));
61-
const addPtTwo = (n: number) => n + 0.2;
60+
const multiplyByFive = (n: number) => n * 5;
61+
const addTwo = (n: number) => n + 2;
6262

6363
it(`should compose functions`, () => {
64-
const addPrecision = compose(
65-
precision,
66-
addPtTwo
64+
const add2AndMultiply5 = compose(
65+
multiplyByFive,
66+
addTwo
6767
);
68-
const addPrecisionCubed = compose(
68+
const add2AndMultiply5Cubed = compose(
6969
cube,
70-
addPrecision
70+
add2AndMultiply5
7171
);
7272

73-
expect(addPrecision(0.1)).toBe(0.3);
74-
expect(addPrecisionCubed(0.1)).toBe(0.027);
73+
expect(add2AndMultiply5(1)).toBe(15);
74+
expect(add2AndMultiply5Cubed(2)).toBe(8000);
7575
});
7676

7777
it(`should act as identity if no functions passed`, () => {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"publish:latest": "ts-node ./build/publish-latest.ts"
4040
},
4141
"engines": {
42-
"node": ">=10.9.0 <=11.12.0",
42+
"node": ">=10.9.0 <=12.12.0",
4343
"npm": ">=5.3.0",
4444
"yarn": ">=1.9.2 <2.0.0"
4545
},

0 commit comments

Comments
 (0)