Skip to content

Solution#1042

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

Solution#1042
CNegruzzi wants to merge 3 commits intomate-academy:mainfrom
CNegruzzi:develop

Conversation

@CNegruzzi
Copy link

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

Your submission provides a good set of tests for the splitInteger function, and your data-driven approach is well-executed. However, changes are needed because some specific test cases required by the task description are missing. To fully meet the requirements, please add tests for the following examples mentioned in the task description:

  • splitInteger(17, 4)
  • splitInteger(32, 6)

Ensuring all specified examples are tested is crucial for verifying that the function behaves exactly as described. You're very close to completing this task!


✨ 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 5 to 30
const testCases = [
{
description: 'should split a number into equal parts if a value is divisible by a numberOfParts',
value: 10,
numberOfParts: 2,
expected: [5, 5],
},
{
description: 'should return a part equals to a value when splitting into 1 part',
value: 3,
numberOfParts: 1,
expected: [3],
},
{
description: 'should sort parts ascending if they are not equal',
value: 5,
numberOfParts: 3,
expected: [1, 2, 2],
},
{
description: 'should add zeros if value < numberOfParts',
value: 2,
numberOfParts: 5,
expected: [0, 0, 0, 1, 1],
},
];

Choose a reason for hiding this comment

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

Your test cases cover some good scenarios. However, the task description explicitly asks to verify a specific set of examples, and some of them are missing from your tests. Please add test cases for splitInteger(17, 4) and splitInteger(32, 6) as mentioned in 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

Great progress on adding the test cases! You've successfully added the test for splitInteger(17, 4), which was one of the missing requirements.

This submission requires one final change to be complete. The test case for splitInteger(32, 6), which was mentioned in the task description, is still missing. Please add this example to your testCases array in src/splitInteger.test.js.

You're very close to finishing this task!


✨ 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 5 to 30
const testCases = [
{
description: 'should split a number into equal parts if a value is divisible by a numberOfParts',
value: 6,
numberOfParts: 2,
expected: [3, 3],
},
{
description: 'should return a part equals to a value when splitting into 1 part',
value: 8,
numberOfParts: 1,
expected: [8],
},
{
description: 'should sort parts ascending if they are not equal',
value: 17,
numberOfParts: 4,
expected: [4, 4, 4, 5],
},
{
description: 'should add zeros if value < numberOfParts',
value: 2,
numberOfParts: 5,
expected: [0, 0, 0, 1, 1],
},
];

Choose a reason for hiding this comment

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

You've successfully added one of the missing test cases. To fully meet the requirements, please also add the test case for splitInteger(32, 6), which is mentioned in the task description.

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 submission! You've successfully addressed the feedback from the previous review by adding the final required test case for splitInteger(32, 6). Your test suite now covers all the examples from the task description, and the additional edge case you included is a fantastic touch. This solution fully meets all requirements, and I am happy to give it my approval. Keep up the great work!


✨ 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