Skip to content

Conversation

@tonyb650
Copy link
Contributor

Description

Before:

The GroupCard component lacked unit tests.

After:

Unit tests have been added for GroupCard component:

  • renders the expected elements: group name, group image, member count & formatted date. The formatDate function is mocked to avoid time zone issues.
  • "member count" is singular when count is 1
  • "member count" is plural when count is not 1
  • the card has the correct href attribute to correctly link to the group's /gift-exchanges/ page

Unit test has been added for GroupCardSkeleton component:

  • renders as expected. The outer-most <div> element is updated with data-testid="group-card-skeleton".

Closes #192

Pre-submission checklist

  • Code builds and passes locally
  • PR title follows Conventional Commit format (e.g. test #001: created unit test for __ component)
  • Request reviews from the Peer Code Reviewers and Senior+ Code Reviewers groups
  • Thread has been created in Discord and PR is linked in gis-code-questions

@tonyb650 tonyb650 requested review from a team, Yassahr and nickytonline and removed request for a team September 30, 2025 23:01
@vercel
Copy link

vercel bot commented Sep 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
elecretanta Ready Ready Preview Comment Oct 10, 2025 2:07am
elecretanta-storybook Ready Ready Preview Comment Oct 10, 2025 2:07am
elecretanta-unit-test Ready Ready Preview Comment Oct 10, 2025 2:07am

@shashilo shashilo requested review from a team September 30, 2025 23:01
@shashilo shashilo requested review from a team and removed request for a team October 2, 2025 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create unit test for GroupCard.tsx

3 participants