Problem
The react-frontend currently has no test suite. As the frontend
moves toward production (see #248, #249), there is no safety net
to catch regressions in core components or the search flow.
Proposed Solution
Set up Jest and React Testing Library as the testing foundation
for the React frontend, starting with the most critical components.
Suggested Test Coverage (Starting Point)
SearchBar.jsx — input handling, submission, empty state
SearchResults.jsx — renders results, handles no-results state
HeroSection.jsx — basic render test
- Search API integration — mock the Flask/Node.js API response
Implementation Plan
- Install
@testing-library/react and @testing-library/jest-dom
- Add test scripts to
package.json
- Write tests for the 3 core components listed above
- Add
npm test -- --watchAll=false as a CI step in
.github/workflows/
Why This Matters
Without tests, every refactor or dependency update is a risk.
This is a prerequisite for the Vite migration and any future
component-level changes.
Happy to guide anyone who picks this up.
Problem
The
react-frontendcurrently has no test suite. As the frontendmoves toward production (see #248, #249), there is no safety net
to catch regressions in core components or the search flow.
Proposed Solution
Set up Jest and React Testing Library as the testing foundation
for the React frontend, starting with the most critical components.
Suggested Test Coverage (Starting Point)
SearchBar.jsx— input handling, submission, empty stateSearchResults.jsx— renders results, handles no-results stateHeroSection.jsx— basic render testImplementation Plan
@testing-library/reactand@testing-library/jest-dompackage.jsonnpm test -- --watchAll=falseas a CI step in.github/workflows/Why This Matters
Without tests, every refactor or dependency update is a risk.
This is a prerequisite for the Vite migration and any future
component-level changes.
Happy to guide anyone who picks this up.