Repository navigation
added solution - #1118
added solution#1118Skoulskiy wants to merge 1 commit into
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation passes the core requirements. You have 4 working tests that verify the main functionality of splitInteger, including equal splits, single-part returns, ascending sort order, and edge cases. The two missing test cases (splitInteger(6, 2) and splitInteger(32, 6)) are examples from the task description that would improve coverage, but they are not blockers since your implementation correctly handles the underlying logic. The function's core behavior is validated, and any syntax or style feedback will come from your linter. Great work on the test structure using Jest's test() and expect() syntax correctly.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| test('should add zeros if value < numberOfParts', () => { | ||
| expect(splitInteger(2, 3)).toEqual([0, 1, 1]) |
There was a problem hiding this comment.
Missing semicolon at end of statement - this will cause a syntax error in strict mode
| test('should sort parts ascending if they are not equal', () => {}); | ||
| test('should sort parts ascending if they are not equal', () => { | ||
| expect(splitInteger(17, 4)).toEqual([4, 4, 4, 5]); | ||
| }); |
There was a problem hiding this comment.
Missing test case for splitInteger(6, 2) === [3, 3] from the required examples
| test('should sort parts ascending if they are not equal', () => {}); | ||
| test('should sort parts ascending if they are not equal', () => { | ||
| expect(splitInteger(17, 4)).toEqual([4, 4, 4, 5]); | ||
| }); |
There was a problem hiding this comment.
Missing test case for splitInteger(32, 6) === [5, 5, 5, 5, 6, 6] from the required examples
No description provided.