UNPKG

safepassword-utils

Version:

A secure and flexible password generation and validation utility for TypeScript/JavaScript applications

15 lines (14 loc) 472 B
import { checkPasswordStrength } from '../index'; describe('Weak Password Strength', () => { test('should return "Weak" for simple passwords', () => { const result = checkPasswordStrength('password123'); expect(result.id).toBe(1); expect(result.value).toBe('Weak'); expect(result.contains).toEqual({ lowercase: true, uppercase: false, number: true, symbol: false, }); }); });