Skip to content

Conversation

@bosun-ai
Copy link

@bosun-ai bosun-ai bot commented Nov 10, 2025

Summary

Work in progress to upgrade React from 3.1.15 to 17.0.2. This PR documents initial setup for a regression test suite to support the upgrade. No significant application code changes are included yet.

Scope of changes

  • Added regression test infrastructure:
    • regression-tests/jest.config.js for Jest configuration targeting regression tests.
    • regression-tests/setupTests.js to initialize RTL, MSW server, and jsdom environment.
    • regression-tests/button.regression.test.js with a passing test covering src/components/button behavior (renders children, disabled when isLoading, onClick not invoked).
  • Added testing libraries and utilities in package.json:
    • @testing-library/react, @testing-library/jest-dom, @testing-library/user-event
    • msw and whatwg-fetch
  • Added .nvmrc specifying Node 12 to ensure consistent local environment for running tests.
  • Updated react-dom dependency reference to a semver version (preparatory step toward upgrading React).

Reasoning

Setting up a minimal, isolated regression test suite allows targeted verification of key components during the React version upgrade without impacting the existing test setup. The initial Button test provides a baseline for interactive behavior under loading/disabled states.

Regression test suite setup

  • Directory: regression-tests/
  • Tools: Jest, React Testing Library (RTL), MSW
  • Included passing test for: src/components/button

Testing instructions

Run a single regression test using npm fallback:

  • nvm use && npm run jest -- --config regression-tests/jest.config.js regression-tests/button.regression.test.js --runInBand

Impact and risk

  • Low risk at this stage; changes are limited to test scaffolding and dependencies. Application runtime behavior is not modified yet.
  • Ensures future React upgrade work has a test harness to catch regressions.

Follow-ups and open questions

  • Complete React and react-dom upgrade to 17.0.2 and adjust related dependencies.
  • Expand regression coverage to other critical components and flows.
  • Align Node version and CI config with the regression test suite.
  • Confirm compatibility of existing build tooling with React 17 (webpack/babel config, react-app-rewired).

This PR is a work in progress and is not intended to be merged.


This pull request is created by bosun, a code maintenance automation platform. For more information, visit bosun.ai.

@bosun-ai bosun-ai bot changed the title chore: add .nvmrc for Node version alignment (WIP) chore: set up regression test suite to support React upgrade Nov 10, 2025
Bosun added 29 commits November 10, 2025 12:48
@tinco tinco marked this pull request as ready for review November 10, 2025 13:48
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.

1 participant