Skip to content

Commit c29077a

Browse files
Update
1 parent 3e94da8 commit c29077a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/splitInteger.test.js

Lines changed: 3 additions & 3 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-
expect(splitInteger(8,1)).toEqual([8]);
7+
expect(splitInteger(6, 2)).toEqual([3, 3]);
88
});
99

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

1515
test('should sort parts ascending if they are not equal', () => {
1616
expect(splitInteger(17, 4)).toEqual([4, 4, 4, 5]);
1717
});
1818

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

0 commit comments

Comments
 (0)