Skip to content

Commit

Permalink
added unit tests: password strength div
Browse files Browse the repository at this point in the history
  • Loading branch information
thecarlo committed Apr 28, 2024
1 parent 96b5b61 commit 399b266
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/GeneratePassword/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -326,5 +326,13 @@ describe('GeneratePassword', () => {
);

expect(passwordStrengthIndicator).toBeInTheDocument();

const passwordStrengthIndicatorFirstChild =
passwordStrengthIndicator.firstElementChild;

const passwordStrengthIndicatorSecondChild =
passwordStrengthIndicatorFirstChild?.firstChild;

expect(passwordStrengthIndicatorSecondChild).toHaveClass('bg-red-500');
});
});

0 comments on commit 399b266

Please # to comment.