Skip to content

Solution#153

Open
Marcin123456t wants to merge 3 commits intomate-academy:mainfrom
Marcin123456t:develop
Open

Solution#153
Marcin123456t wants to merge 3 commits intomate-academy:mainfrom
Marcin123456t:develop

Conversation

@Marcin123456t
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@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

Thank you for your thorough test coverage! However, there are two critical issues to address before your PR can be approved: (1) The test case for 'test838@gmail.com.' incorrectly expects a valid result, but emails with a trailing dot in the domain are not valid—please update this test to expect false. (2) The test named should return boolean is currently empty and does not test anything—please add meaningful assertions or remove it. Once you fix these, your test suite will be in great shape! 🚀


✨ 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

@@ -16,5 +16,33 @@ describe(`Function 'validateEmail':`, () => {
.toBeTruthy();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The test expects 'validateEmail' to return true for 'test838@gmail.com.' (with a trailing dot). However, an email address ending with a dot is not valid according to standard email validation rules. This test case may be incorrect and should be reviewed according to the requirements.

Copy link
Copy Markdown

@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 covering all the requirements and writing comprehensive tests! However, there's one critical issue: the test for 'test838@gmail.com.' should expect false since emails with a trailing dot in the domain are invalid. Please update this expectation, and your submission will be perfect! Keep up the good work! 🚀


✨ 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

Comment on lines +16 to +17
it(`should return 'true' for the invalid email`, () => {
expect(validateEmail('test838@gmail.com.')).toBe(true);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Issue: The test expects validateEmail('test838@gmail.com.') to return true, but an email address with a trailing dot in the domain part is invalid. Please update the expectation to false to match standard email validation rules.

Copy link
Copy Markdown

@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

Your test file src/validateEmail.test.js is thorough and meets all the specified requirements for email validation. All critical cases are well-covered, including handling of allowed and forbidden characters, dot placement, and domain structure. The previous issue with emails ending in a dot has been correctly addressed, and your use of Jest assertions is clear and effective. Excellent work—no further changes are needed. Keep up the great attention to detail! ✅


✨ 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