Skip to content

Solution#180

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

Solution#180
DemonWayne wants to merge 2 commits intomate-academy:mainfrom
DemonWayne:develop

Conversation

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

Great job on setting up a comprehensive test suite with many edge cases! However, some changes are needed before this can be approved.

The main issue is that the test for reversing an array with multiple strings has an incorrect expected value. According to the task, the logic is to join all strings, reverse the combined string, and then split it back into parts with the same lengths as the original strings. For the input ["It's not a lake,", " ", "it's an ocean"], the expected output should be ["naeco na s'ti ,ek", "a", "l a ton s'tI"].

Additionally, please add tests for all the specific examples provided in the task description, such as arrayReverse(['Hell0']), to ensure full coverage of the requirements. Once these tests are corrected and added, your solution will be ready!


✨ 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

it(`should return array with reversed words
if original array consists of several words`, () => {
expect(arrayReverse([`It's not a lake,`, ` `, `it's an ocean`]))
.toEqual([`naeco na s'ti ,e`, `k`, `al a ton s'tI`]);

Choose a reason for hiding this comment

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

This expected output appears to be incorrect based on the rules in the task description. The logic should be:

  1. Join the array into a single string: "It's not a lake, it's an ocean"
  2. Reverse this string: "naeco na s'ti ,ekal a ton s'tI"
  3. Split the reversed string back into an array, using the lengths of the original strings [17, 1, 14].

The correct result should be ["naeco na s'ti ,ek", "a", "l a ton s'tI"].

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 revision! I'm happy to approve your solution. You've successfully addressed all the feedback from the previous review, correcting the test cases and ensuring all required examples from the task description are included. The test suite is now comprehensive and correctly validates the function's behavior. Well done!


✨ 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