Tests for a arrayReverse function#145
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Thank you for your work on the tests! However, there are critical issues with the expected outputs in several test cases—they do not match the required behavior of the arrayReverse function as described in the task. The function should reverse both the order of the strings and the characters within the strings, but the current expected results do not reflect this. Please review the requirements and update the expected outputs in your tests so they accurately verify the correct functionality. Once these corrections are made, your submission will be much stronger! Keep going—you’re almost there! 🚀
✨ 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
| expect(arrayReverse(['I', 'am', 'a', 'student!'])).toEqual([ | ||
| '!', | ||
| 'tn', | ||
| 'e', | ||
| 'dutsamaI', |
There was a problem hiding this comment.
Issue: The expected output for this test case does not seem to align with the likely intended behavior of an array reverse function. If the function is supposed to reverse the order of the strings and also reverse each string, the expected output should be ['!tneduts', 'a', 'ma', 'I']. Please verify the requirements and adjust the expected output accordingly.
There was a problem hiding this comment.
Examples:
arrayReverse(['Hell0']) === ['0lleH'];
arrayReverse(['Mate', 'Academy']) === ['ymed', 'acAetaM'];
arrayReverse(['I', 'am', 'a', 'student!']) === ['!', 'tn', 'e', 'dutsamaI'];
src/arrayReverse.test.js
Outdated
| }); | ||
|
|
||
| it('should ', () => { | ||
| expect(arrayReverse(['I', 'stude'])).toEqual(['e', 'dutsI']); |
There was a problem hiding this comment.
Issue: The expected output ['e', 'dutsI'] does not match the likely intended behavior. If the function should reverse the order of the strings and reverse each string, the correct output should be ['eduts', 'I']. Please review the requirements and update the expected output.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great job! 🎉 You have addressed all previous issues, and your tests now correctly verify that the arrayReverse function reverses both the order of the strings and the characters within each string, as required. All core requirements are fully met, and your code is ready for acceptance. Keep up the excellent work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
src/arrayReverse.test.js
Outdated
| }); | ||
|
|
||
| it('should reverse two strings', () => { | ||
| expect(arrayReverse(['Mate', 'Academy'])).toEqual(['ymed', 'acAetaM']); |
There was a problem hiding this comment.
Issue: The expected output for this test case does not match the required behavior. According to the task, the function should reverse both the order of the strings and the characters within each string. Please update the expected result so that it reflects this requirement.
| expect(arrayReverse(['I', 'am', 'a', 'student!'])).toEqual([ | ||
| '!', | ||
| 'tn', | ||
| 'e', | ||
| 'dutsamaI', |
There was a problem hiding this comment.
Issue: The expected output for this test case does not match the required behavior. The function should reverse the order of the strings and also reverse the characters in each string. Please update the expected result accordingly.
src/arrayReverse.test.js
Outdated
| }); | ||
|
|
||
| it('should ', () => { | ||
| expect(arrayReverse(['I', 'stude'])).toEqual(['e', 'dutsI']); |
There was a problem hiding this comment.
Issue: The expected output for this test case does not match the required behavior. The function should reverse both the order of the strings and the characters within each string. Please update the expected result.
No description provided.