Skip to content

Feature/prettier#1078

Merged
marina-tilniak merged 1 commit intomate-academy:mainfrom
mykhalenych:feature/prettier
Mar 11, 2026
Merged

Feature/prettier#1078
marina-tilniak merged 1 commit intomate-academy:mainfrom
mykhalenych:feature/prettier

Conversation

@mykhalenych
Copy link
Contributor

added prettier and updated packages and node.js for gh actions

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 setting up the project tooling and the basic structure for the tests in src/splitInteger.test.js. However, I am requesting changes because the test cases themselves are empty. The primary goal of this task is to write the test logic to verify the splitInteger function's behavior. You need to add assertions inside each test block. For example, you should call the function and then check its output, like this: expect(splitInteger(20, 4)).toEqual([5, 5, 5, 5]). Please implement the logic for all the tests you've outlined, and I'll be happy to review it again!


✨ 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

if a value is divisible by a numberOfParts`, () => {

});
if a value is divisible by a numberOfParts`, () => {});

Choose a reason for hiding this comment

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

This test case is currently empty. You need to implement the test logic by calling splitInteger with appropriate arguments and using an assertion like expect().toEqual() to verify the result.

test('should sort parts ascending if they are not equal', () => {

});
when splitting into 1 part`, () => {});

Choose a reason for hiding this comment

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

This test is also missing its implementation. Make sure to add the function call and an assertion to verify that splitting into one part returns an array with the original value.

when splitting into 1 part`, () => {});

test('should add zeros if value < numberOfParts', () => {
test('should sort parts ascending if they are not equal', () => {});

Choose a reason for hiding this comment

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

This test for unequal parts is unimplemented. You should test one of the examples from the description, like splitInteger(17, 4), and verify that the resulting array is sorted correctly.

test('should sort parts ascending if they are not equal', () => {});

});
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 is a good edge case to consider, but the test body is empty. Please add the necessary code to call the function and assert the expected output.

@marina-tilniak marina-tilniak merged commit c974160 into mate-academy:main Mar 11, 2026
1 check failed
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