Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great work on the tests for the restoreNames function! Your solution is being approved as it successfully covers all the requirements, including handling missing or undefined names and verifying the function's return value.
I have a couple of minor suggestions for your test descriptions to make them even clearer for other developers:
- In
src/restoreNames.test.js, there's a small typo: "frome" should be "from". - The test description
it('should return anything', ...)could be more precise. Since you correctly test for anundefinedreturn, a description likeit('should not return anything')would better reflect the test's intent.
These are just small pointers for the future. Excellent job overall!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
src/restoreNames.test.js
Outdated
| const { restoreNames } = require('./restoreNames'); | ||
|
|
||
| it('should ', () => { | ||
| it('should restore firstName frome fullName if firstName is missing', () => { |
There was a problem hiding this comment.
There's a small typo in the test description. It should be 'from' instead of 'frome'.
src/restoreNames.test.js
Outdated
| }); | ||
|
|
||
| // write tests here | ||
| it('should return anything', () => { |
There was a problem hiding this comment.
This test description is a bit misleading. The phrase 'should return anything' can be interpreted as the function returning any value. A clearer description, which aligns with the test logic and the requirements, would be 'should not return anything' or 'should return undefined'.
No description provided.