Skip to content

solution#1072

Open
Mitlosh wants to merge 3 commits intomate-academy:mainfrom
Mitlosh:develop
Open

solution#1072
Mitlosh wants to merge 3 commits intomate-academy:mainfrom
Mitlosh:develop

Conversation

@Mitlosh
Copy link

@Mitlosh Mitlosh commented Feb 22, 2026

No description provided.

Copy link

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

Choose a reason for hiding this comment

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

Review Summary

Good work on setting up the test file and writing clear descriptions for each case. However, some changes are needed because not all the required test cases from the task description have been included.

While the tests you've written are valid, the requirements explicitly ask for tests covering these specific examples:

  • splitInteger(8, 1)
  • splitInteger(6, 2)
  • splitInteger(32, 6)

Please update your test file to ensure these exact cases are covered. It's important to verify all examples provided in the requirements to confirm the function behaves as expected.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

test(`should split a number into equal parts
if a value is divisible by a numberOfParts`, () => {

expect(splitInteger(12, 3)).toEqual([4, 4, 4]);

Choose a reason for hiding this comment

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

This is a valid test, but the task description requires a test for splitInteger(6, 2). It's important to verify the exact examples provided in the requirements.

test(`should return a part equals to a value
when splitting into 1 part`, () => {

expect(splitInteger(12, 1)).toEqual([12]);

Choose a reason for hiding this comment

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

This is another valid test case, but the requirements specify testing splitInteger(8, 1). Please make sure all provided examples are covered.

Copy link

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

Choose a reason for hiding this comment

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

Review Summary

Excellent progress on adding the test cases from the previous review. You're very close to completing the task!

However, one required test case is still missing. The task description explicitly requires a test for splitInteger(32, 6).

Please add a new test case to src/splitInteger.test.js to verify that splitInteger(32, 6) correctly returns [5, 5, 5, 5, 6, 6]. Once that's in place, this will be ready for approval.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment on lines +19 to 21
test("should add zeros if value < numberOfParts", () => {
expect(splitInteger(3, 5)).toEqual([0, 0, 1, 1, 1]);
});

Choose a reason for hiding this comment

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

You're almost there! The task description requires one more specific example to be tested: splitInteger(32, 6). Please add a new test case for this scenario to ensure the function is fully validated against the requirements.

Copy link

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

Choose a reason for hiding this comment

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

Review Summary

Excellent work on this task, especially for adding the test case for splitInteger(32, 6). Your solution is very nearly complete!

To help you keep moving forward, I am approving this submission as an educational override. However, please note that one required test case is still missing from src/splitInteger.test.js. The task description asks for a test to verify that splitInteger(17, 4) returns [4, 4, 4, 5].

Once you add that final test, your solution will fully meet all requirements. You're doing great!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

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