Skip to content

Commit cab05a6

Browse files
Solution
1 parent c1fcf43 commit cab05a6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/splitInteger.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ const splitInteger = require('./splitInteger');
44

55
test(`should split a number into equal parts
66
if a value is divisible by a numberOfParts`, () => {
7-
7+
expect(splitInteger(12, 2)).toEqual([6, 6]);
88
});
99

1010
test(`should return a part equals to a value
1111
when splitting into 1 part`, () => {
12-
12+
expect(splitInteger(7, 1)).toEqual([7]);
1313
});
1414

1515
test('should sort parts ascending if they are not equal', () => {
16-
16+
expect(splitInteger(8, 3)).toEqual([2, 3, 3]);
1717
});
1818

1919
test('should add zeros if value < numberOfParts', () => {
20-
20+
expect(splitInteger(2, 5)).toEqual([0, 0, 0, 1, 1]);
2121
});

0 commit comments

Comments
 (0)