Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
This is a good start, but changes are needed because some core requirements from the task description have not been met. Your test suite is missing several required example cases.
Please add tests for the following examples, which are explicitly mentioned in the task description:
splitInteger(8, 1)splitInteger(6, 2)splitInteger(17, 4)
Additionally, I noticed a duplicate test case for splitInteger(32, 6). It's best to remove the redundant test to keep the suite clean and ensure each test provides unique value. Once these required tests are added, your solution will be complete!
✨ 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
src/splitInteger.test.js
Outdated
| test(`should return a part equals to a value | ||
| when splitting into 1 part`, () => { | ||
|
|
||
| expect(splitInteger(32, 1)).toEqual([32]); |
There was a problem hiding this comment.
The requirements specify several example cases to test, including splitInteger(8, 1), splitInteger(6, 2), and splitInteger(17, 4). Your current tests are missing these. Please add tests to cover all the required examples from the task description.
src/splitInteger.test.js
Outdated
|
|
||
| test('should sort parts ascending if they are not equal', () => { | ||
|
|
||
| expect(splitInteger(32, 6)).toEqual([5, 5, 5, 5, 6, 6]); |
There was a problem hiding this comment.
This test case uses the same inputs and expected output as the test on line 7, making it a duplicate. It's best to have unique test cases. You could replace this with one of the missing required examples, like splitInteger(17, 4).
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great progress on this! Your test suite is much more robust. However, a couple of changes are needed to fully meet the task requirements. The test suite is missing the required test case for splitInteger(32, 6). Additionally, one of the tests uses splitInteger(10, 1) instead of the required splitInteger(8, 1). Please add the missing test and update the other one to use the exact values specified in the task description. Once those two examples are covered, this will be perfect!
✨ 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
src/splitInteger.test.js
Outdated
| test(`should return a part equals to a value | ||
| when splitting into 1 part`, () => { | ||
|
|
||
| expect(splitInteger(10, 1)).toEqual([10]); |
There was a problem hiding this comment.
While this test is valid, the task description specifically requires a test for splitInteger(8, 1). Please update this test to use the example provided in the requirements.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great job on fixing the test case for splitInteger(8, 1)! Your test suite is looking very solid.
The only thing missing is the required test case for splitInteger(32, 6). To fully meet the task requirements, please add a test to verify that this function call correctly returns [5, 5, 5, 5, 6, 6].
I am approving your submission as an educational override to help you progress. Keep up the excellent work, you're very close to a perfect solution!
✨ 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(4, 7)).toEqual([0, 0, 0, 1, 1, 1, 1]); | ||
| }); |
There was a problem hiding this comment.
This is a good test for an edge case! However, the task description requires a specific test case for splitInteger(32, 6) which is currently missing. Please make sure to add a test for that example to meet all the requirements.
No description provided.