test: add tests for validateEmail function#168
test: add tests for validateEmail function#168mykhailokurochkin wants to merge 2 commits intomate-academy:mainfrom
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
This requires a few changes before it can be approved. While you've set up a good foundation for the test suite, it's currently missing several critical test cases that are required by the task description. Specifically, you need to add tests for all the examples provided: 'test@mail.com', 't@q.c', and 'false@email'. Remember that the test for 'false@email' should assert that the function returns false, as the domain part must contain a dot. Additionally, please expand your tests to cover other rules, such as a dot not being allowed immediately before the @ (e.g., 'test.@domain.com') or at the start of the domain (e.g., 'test@.domain.com'). Adding these cases will ensure your test suite is comprehensive and meets all requirements.
✨ 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
| it(`should return 'false' for emails without '@'`, () => { | ||
| expect(validateEmail('test838gmail.com')).toBe(false); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
This test suite is missing several required cases. You should add tests for all the examples from the description (like 'test@mail.com', 't@q.c', and 'false@email'). Also, consider adding tests for other rules, such as a dot not being allowed immediately before the @ or at the start of the domain.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on updating the test suite for validateEmail! You've successfully addressed all the previous feedback, and the tests are now comprehensive and well-structured. The test coverage fully meets all the requirements from the task description, including all specific examples and validation rules. I am happy to approve your solution. Keep up the great work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.