Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Add tests in Jest to frontend components #7693

Draft
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

jonwaldstein
Copy link
Contributor

This was created from #7324 after being reverted from develop due to build issues.

Description

This pull request serves as a starting point for implementing unit and behavioral tests for our React components. Tests are run in Jest with assistance from the Testing Library React (TLR) library. It includes tests that cover all components used in the Event Tickets frontend.

Additionally, I have added several new scripts to package.json to facilitate triggering the tests with specific configurations (listed below). I have also included a job for these tests in our GitHub workflow.

npm test
npm run test:verbose
npm run test:watch
npm run test:watch:verbose
npm run test:coverage

Visuals

CleanShot 2024-03-22 at 22 21 53

CleanShot 2024-03-22 at 22 22 25

Testing Instructions

Run one of the new available scripts.

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

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.

2 participants