Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Changes are needed for this submission. You've built a solid foundation by testing the examples from the task description, which is a great start! However, the test suite is incomplete because it doesn't check each validation rule on its own. To ensure full coverage, please add specific tests for these cases:
- A password that is too short (fewer than 8 characters).
- A password that is too long (more than 16 characters).
- A password missing a digit.
- A password missing an uppercase letter.
- A password missing a special character.
Adding these will make your test suite comprehensive and ensure the function is fully validated.
✨ 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 'true' for the valid password with 8 characters`, () => { | ||
| expect(checkPassword('Password1!')).toBe(true); | ||
| }); | ||
|
|
||
| it('returns false for too-short, lowercase-only password', () => { | ||
| expect(checkPassword('qwerty')).toBe(false); | ||
| }); | ||
|
|
||
| // write more tests here | ||
| it(`should return false for short mixed-case password with symbol`, () => { | ||
| expect(checkPassword('Str@ng')).toBe(false); | ||
| }); |
There was a problem hiding this comment.
These tests cover the provided examples well, but the test suite is incomplete. Consider adding more tests to check each validation rule individually. For instance, you should test passwords that are too long, or passwords that meet the length requirement but are missing a digit, an uppercase letter, or a special character.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on addressing the previous feedback! Your test suite is much more robust now with specific tests for each validation rule. However, there's one final requirement that needs to be covered before this can be approved. The tests don't currently check if the password rejects invalid characters, such as non-Latin letters or emojis. Please add a test case with a password containing invalid characters (e.g., 'пароль1!' or 'Password1!🚀') and assert that checkPassword returns false. Adding this one last test will make your solution complete!
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this submission! You've successfully addressed the previous feedback by adding a test case for invalid characters. Your test suite is now complete and thoroughly covers all the password validation rules outlined in the requirements. The tests are well-written and logical. This is a great submission, and I am happy to approve it.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.