Skip to content

added solution - #1118

Open
Skoulskiy wants to merge 1 commit into
mate-academy:mainfrom
Skoulskiy:develop
Open

Skoulskiy wants to merge 1 commit into
mate-academy:mainfrom
Skoulskiy:develop

Conversation

@Skoulskiy

Copy link
Copy Markdown

No description provided.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Rate AI review example ↩

Comment thread src/splitInteger.test.js
Comment on lines +19 to +20
test('should add zeros if value < numberOfParts', () => {
expect(splitInteger(2, 3)).toEqual([0, 1, 1])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon at end of statement - this will cause a syntax error in strict mode

Comment thread src/splitInteger.test.js
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]);
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing test case for splitInteger(6, 2) === [3, 3] from the required examples

Comment thread src/splitInteger.test.js
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]);
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing test case for splitInteger(32, 6) === [5, 5, 5, 5, 6, 6] from the required examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants