From 9d3cf37a03cfb5f464fa6d831e5dbab1c80e49f9 Mon Sep 17 00:00:00 2001 From: tiavina-mika Date: Fri, 14 Jun 2024 00:49:17 +0300 Subject: [PATCH] Create index.spec.ts --- src/__tests__/index.spec.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/__tests__/index.spec.ts 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'); + }); +});