diff --git a/package-lock.json b/package-lock.json index 79127efc..f6abf20a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "eslint": "^5.16.0", "eslint-plugin-jest": "^22.4.1", "eslint-plugin-node": "^8.0.1", - "jest": "^24.5.0" + "jest": "^24.9.0" } }, "node_modules/@babel/code-frame": { @@ -3567,6 +3567,7 @@ "resolved": "https://registry.npmjs.org/jest/-/jest-24.9.0.tgz", "integrity": "sha512-YvkBL1Zm7d2B1+h5fHEOdyjCG+sGMz4f8D86/0HiqJ6MB4MnDc8FgP5vdWsGnemOQro7lnYo8UakZ3+5A0jxGw==", "dev": true, + "license": "MIT", "dependencies": { "import-local": "^2.0.0", "jest-cli": "^24.9.0" diff --git a/package.json b/package.json index f782ac5a..077b4aee 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "eslint": "^5.16.0", "eslint-plugin-jest": "^22.4.1", "eslint-plugin-node": "^8.0.1", - "jest": "^24.5.0" + "jest": "^24.9.0" }, "mateAcademy": { "projectType": "javascript" diff --git a/src/splitInteger.js b/src/splitInteger.js index d3da7485..02ff9d2c 100644 --- a/src/splitInteger.js +++ b/src/splitInteger.js @@ -21,3 +21,4 @@ function splitInteger(value, numberOfParts) { } module.exports = splitInteger; +//AI Buddy you're the best \ No newline at end of file diff --git a/src/splitInteger.test.js b/src/splitInteger.test.js index a610317d..c58cac5c 100644 --- a/src/splitInteger.test.js +++ b/src/splitInteger.test.js @@ -4,18 +4,18 @@ const splitInteger = require('./splitInteger'); test(`should split a number into equal parts if a value is divisible by a numberOfParts`, () => { - + expect(splitInteger(120, 3)).toEqual([40, 40, 40]); }); test(`should return a part equals to a value when splitting into 1 part`, () => { - + expect(splitInteger(12, 1)).toEqual([12]); }); test('should sort parts ascending if they are not equal', () => { - + expect(splitInteger(10, 3)).toEqual([3, 3, 4]); }); test('should add zeros if value < numberOfParts', () => { - + expect(splitInteger(3, 5)).toEqual([0, 0, 1, 1, 1]); });