openmainframeproject / openmainframeproject/software-discovery-tool

Add test suite for React frontend using Jest and React Testing Library

Open
#286 1 comment 0 reactions 1 assignee View on GitHub

@vmuralictr is already working on this.

Since May 27, 2026.

Dominant language
JavaScript
Stars
41
Forks
50
Avg merge
2d 5h
Merged PRs (30d)
3

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.