Skip to content

Conversation

@Mahtem
Copy link

@Mahtem Mahtem commented Nov 21, 2025

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

In this section, functions to find a char in a string, and a password validator were implemented and tested.

Questions

No questions...

@Mahtem Mahtem added 📅 Sprint 3 Assigned during Sprint 3 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Nov 21, 2025
Comment on lines +27 to +49
test("password has at least one uppercase", () => {
const password = "Uo85*";
const result = isValidPassword(password, previousPasswords);
expect(result).toEqual(true);npx
});

test("password has at least one lowercase", () => {
const password = "Qf#45";
const result = isValidPassword(password, previousPasswords);
expect(result).toEqual(true);
});

test("password has at least one number", () => {
const password = "Cz!35";
const result = isValidPassword(password, previousPasswords);
expect(result).toEqual(true);
});

test("password has at least one special symbol", () => {
const password = "Re*19";
const result = isValidPassword(password, previousPasswords);
expect(result).toEqual(true);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

For each of these test case, we should also test if the function can correctly return false when a password meets all criteria except the one specified in the test description.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants