diff --git a/src/__tests__/index.spec.ts b/src/__tests__/index.spec.ts new file mode 100644 index 0000000..0b08a1a --- /dev/null +++ b/src/__tests__/index.spec.ts @@ -0,0 +1,20 @@ +// import {describe, expect, test} from '@jest/globals'; +import { getPasswordStrengthLabel } from '../PasswordStrengthInput'; + +describe('check valid url', () => { + test('tooWeak label', () => { + expect(getPasswordStrengthLabel('tooWeak')).toBe('Too weak'); + }); + + test('weak label', () => { + expect(getPasswordStrengthLabel('weak')).toBe('Weak'); + }); + + test('medium label', () => { + expect(getPasswordStrengthLabel('medium')).toBe('Okay'); + }); + + test('strong label', () => { + expect(getPasswordStrengthLabel('strong')).toBe('Strong'); + }); +});