Skip to content

Conversation

@bosun-ai
Copy link

@bosun-ai bosun-ai bot commented Dec 7, 2025

Summary

  • Prepare for React upgrade from ^16.8.4 to 17.0.2 and add a basic regression test harness to validate compatibility.
  • This is a work in progress and should not be merged.

Scope of changes

  • Tooling
    • Added .nvmrc specifying Node 12 to align with Jest 22 compatibility during regression runs.
    • Updated package.json:
  • Regression test suite
    • Introduced regression-tests/ configured to run under Jest 22 with jsdom:
      • regression-tests/jest.config.js: Jest 22 config, jsdom env, test URL, and setup file.
      • regression-tests/setupTests.js: Extends jest-dom, polyfills fetch, wires MSW server lifecycle.
      • regression-tests/server.js and handlers.js: MSW server scaffolding for future API mocking.
      • regression-tests/simpleComponent.test.js: Minimal render-and-click test using @testing-library/react.

Reasoning

  • Establishes a lightweight regression test suite to validate UI behavior during the React 17 upgrade while keeping runtime pinned to Node 12 and Jest 22 for compatibility with existing tooling.

Regression test suite

  • Location: regression-tests/
  • Test runner: Jest 22 via project scripts
  • Node compatibility: Node 12 (see .nvmrc)
  • Supporting libraries: @testing-library/react, @testing-library/jest-dom, msw, cross-fetch

Testing instructions

  • Run a single test:
    • nvm use && yarn run test:regression -- regression-tests/simpleComponent.test.js

Impact and risk

  • Low risk to production code paths in this PR; changes are isolated to devDependencies, scripts, and new test files.
  • The added .nvmrc may influence local developer environments by defaulting to Node 12 when using nvm.

Follow-ups / open questions

  • Upgrade React and related ecosystem packages to 17.0.2 in a subsequent PR, then expand regression coverage.
  • Evaluate migrating to a newer Jest version and Node runtime once the React upgrade is validated.
  • Add more component and integration-level regression tests, including API interactions via MSW.

Reviewer checklist

  • Confirm the test script runs successfully on Node 12 using nvm.
  • Validate the regression test passes locally.
  • Consider any additional cases to include in the regression suite.

Notes

  • 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 and prepare for React 17 upgrade (WIP) chore: prepare React 17 upgrade and add regression test harness (WIP) Dec 7, 2025
Bosun added 30 commits December 7, 2025 22:30
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.

0 participants