add solution#345
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation passes all requirements and the tests execute successfully. The test file correctly covers all three scenarios: function not returning anything, setting firstName from fullName, and handling users who already have firstName. One minor improvement worth noting: the third test uses expect(users).toEqual(users) which compares the array to itself—this assertion will always pass regardless of any mutations. Consider updating this to compare against a pre-defined expected array like [{firstName: 'Jack', fullName: 'Jack Black'}, {firstName: 'Mike', fullName: 'Mike Ross'}] to properly verify that existing firstName values remain unchanged. This is a test quality improvement rather than a functional issue, so your solution is approved.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
|
|
||
| expect(users).toEqual(users); |
There was a problem hiding this comment.
This assertion compares users to itself, which always passes regardless of mutations. Consider comparing against a pre-defined expected result array to ensure the original values are preserved when users already have firstName.
No description provided.