Skip to content

jsCheckPasswordC1#159

Open
SerhiiSemennikov wants to merge 1 commit intomate-academy:mainfrom
SerhiiSemennikov:develop
Open

jsCheckPasswordC1#159
SerhiiSemennikov wants to merge 1 commit intomate-academy:mainfrom
SerhiiSemennikov:develop

Conversation

@SerhiiSemennikov
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

Excellent work on the test suite for checkPassword! All requirements have been met, and you've done a great job covering the various validation rules and edge cases. I am approving your submission.

As a minor suggestion for future improvement, consider making test descriptions more specific. For instance, a few tests share the same description, 'should return 'false' for invalid password'. Giving each a unique description that explains why the password is invalid (e.g., 'should return false for a password that is too short') makes the test suite easier to read and debug.

Overall, this is a solid implementation. Keep up the great work!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

});

// write more tests here
it(`should return 'false' for the invalid password without special character,`, () => {

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 here. The description string ends with a comma, which seems unintentional.

expect(result).toBe(false);
});

it(`should return 'false' for the invalid password without uppercase letter,`, () => {

Choose a reason for hiding this comment

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

Similar to the comment above, this description also has a trailing comma that could be removed.

Comment on lines +60 to +68
it(`should return 'false' for invalid password`, () => {
const result = checkPassword("qwerty");
expect(result).toBe(false);
});

it(`should return 'false' for invalid password`, () => {
const result = checkPassword("Str@ng");
expect(result).toBe(false);
});

Choose a reason for hiding this comment

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

These two tests have the same description. It's a best practice to give each test case a unique and descriptive name that explains the specific scenario being tested. For example, 'should return false for a password that is too short and lacks required characters'. This makes it easier to identify which specific case has failed when reviewing test results.

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