Skip to content

add task solution#1067

Open
ElisabethPO wants to merge 2 commits intomate-academy:mainfrom
ElisabethPO:develop
Open

add task solution#1067
ElisabethPO wants to merge 2 commits intomate-academy:mainfrom
ElisabethPO:develop

Conversation

@ElisabethPO
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

You've done a great job with the test suite for the splitInteger function, covering most of the required scenarios well. I am requesting one small change before approving your work, as the test suite is missing a required test case from the task description.

Please add a test in src/splitInteger.test.js to cover the splitInteger(32, 6) scenario, which should return [5, 5, 5, 5, 6, 6]. Once that's added, your solution will be complete. Keep up the great work!


✨ 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(2, 5)).toEqual([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 done a good job covering most of the examples from the description. However, one required test case is missing: splitInteger(32, 6). Please add a test to cover this scenario as well.

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 job addressing the feedback and adding the missing test case! All the requirements have been met, so I am approving your submission.

As a minor suggestion for improvement, consider updating the test description in src/splitInteger.test.js. The current description, 'should add zeros if value < numberOfParts', is a bit misleading for the test case splitInteger(32, 6). A more accurate description might be something like 'should correctly split a number with a remainder'.

This is just a suggestion for clarity and doesn't require any changes. Excellent work!


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

Footnotes

  1. Rate AI review example

expect(splitInteger(17, 4)).toEqual([4, 4, 4, 5]);
});

test('should add zeros if value < numberOfParts', () => {

Choose a reason for hiding this comment

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

This test description is a bit misleading. For the test case splitInteger(32, 6), the value (32) is not less than numberOfParts (6). A more accurate description might be something like 'should correctly split a number with a remainder'.

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.

3 participants