Skip to content

Solution#313

Open
AlbinaAlbi wants to merge 3 commits intomate-academy:masterfrom
AlbinaAlbi:develop
Open

Solution#313
AlbinaAlbi wants to merge 3 commits intomate-academy:masterfrom
AlbinaAlbi:develop

Conversation

@AlbinaAlbi
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 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 an undefined return, a description like it('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

  1. Rate AI review example

const { restoreNames } = require('./restoreNames');

it('should ', () => {
it('should restore firstName frome fullName if firstName is missing', () => {

Choose a reason for hiding this comment

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

There's a small typo in the test description. It should be 'from' instead of 'frome'.

});

// write tests here
it('should return anything', () => {

Choose a reason for hiding this comment

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

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'.

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