Skip to content

Commit eff6c2c

Browse files
committed
finish task
1 parent 1791c76 commit eff6c2c

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

src/splitInteger.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"use strict";
1+
'use strict';
22

33
/**
44
* @param {number} value
@@ -20,6 +20,4 @@ function splitInteger(value, numberOfParts) {
2020
return parts;
2121
}
2222

23-
console.log(splitInteger(3, 4));
24-
2523
module.exports = splitInteger;

src/splitInteger.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
"use strict";
1+
'use strict';
22

3-
const splitInteger = require("./splitInteger");
3+
const splitInteger = require('./splitInteger');
44

55
test(`should split a number into equal parts
66
if a value is divisible by a numberOfParts`, () => {
@@ -12,10 +12,10 @@ test(`should return a part equals to a value
1212
expect(splitInteger(8, 1)).toContain(8);
1313
});
1414

15-
test("should sort parts ascending if they are not equal", () => {
15+
test('should sort parts ascending if they are not equal', () => {
1616
expect(splitInteger(17, 4)).toContain(4, 4, 4, 5);
1717
});
1818

19-
test("should add zeros if value < numberOfParts", () => {
19+
test('should add zeros if value < numberOfParts', () => {
2020
expect(splitInteger(3, 4)).toContain(0, 0, 0, 0);
2121
});

0 commit comments

Comments
 (0)