Skip to content

Commit

Permalink
Fix PasswordValidator tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hhvrc authored Jan 10, 2025
1 parent 8f15e6c commit 919a668
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions src/lib/inputvalidation/passwordValidator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,40 +41,6 @@ describe('email validator test', () => {
message: 'Password cannot start or end with whitespace',
});
});
it('password without lowercase character should return false and error', () => {
const result = validatePassword('MYINSECUREPASSWORD123!');
expect(result).toEqual({
valid: false,
message: 'Password must contain a lowercase character',
});
});
it('password without uppercase character should return false and error', () => {
const result = validatePassword('myinsecurepassword123!');
expect(result).toEqual({
valid: false,
message: 'Password must contain a uppercase character',
});
});
it('password without digit should return false and error', () => {
const result = validatePassword('MyInsecurePassword!');
expect(result).toEqual({
valid: false,
message: 'Password must contain a digit',
});
});
it('password without special character should return false and error', () => {
const result = validatePassword('MyInsecurePassword123');
expect(result).toEqual({
valid: false,
message: 'Password must contain a special character',
});
});
it('valid password should return true and no error', () => {
const result = validatePassword('validPassword123!');
expect(result).toEqual({
valid: true,
});
});
it('password match with different password should return false and error', () => {
const result = validatePasswordMatch('password', 'differentpassword');
expect(result).toEqual({
Expand Down

0 comments on commit 919a668

Please sign in to comment.