Added tests for function checkPassword#167
Added tests for function checkPassword#167YevheniiKa wants to merge 4 commits intomate-academy:mainfrom
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great work on building a thorough test suite for the checkPassword function. You've done an excellent job covering the various conditions like length and character types.
However, this requires changes because the specific example test cases from the task description are missing. To complete the task, please add tests for the following inputs:
checkPassword('Password1!')checkPassword('qwerty')checkPassword('Str@ng')
Once you add these required tests, your solution will be ready for approval!
✨ 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
Great job addressing the feedback and adding the required tests! Your test suite is very thorough and covers almost all the requirements. However, changes are needed because one of the specific examples from the task description is still missing a dedicated test. Please add a test to verify that checkPassword('Password1!') correctly returns true. This is a required test case, and adding it will fully complete the task. You're very close to finishing!
✨ 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 building out such a comprehensive test suite! I am approving this solution as an educational override to help you move forward, but there is one important change to review for the future.
In src/checkPassword.test.js, the test for the valid password 'Password1!' correctly checks that the return type is a boolean, but the requirement is to ensure it returns the value true. To fix this, you can change the assertion from expect(typeof checkPassword("Password1!")).toBe("boolean") to expect(checkPassword('Password1!')).toBe(true);.
You've done a fantastic job testing all the other validation rules. Keep up the great work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Added tests for function checkPassword