Skip to content

Conversation

@bosun-ai
Copy link

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

Summary

Work in progress to upgrade React from 3.1.15 to 17.0.2. This PR also introduces a basic regression test suite to support the upgrade effort.

Scope of changes

  • Add regression testing setup with Jest, React Testing Library (RTL), and MSW.
    • Added regression-tests/jest.config.js with jsdom environment and Babel transform for js/jsx.
    • Added regression-tests/setupTests.js to configure jest-dom, polyfills, and MSW server lifecycle.
    • Added regression-tests/loading.test.js with a passing test for the Loading component.
  • Project configuration updates:
    • Added .yarnrc.yml (nodeLinker: node-modules) and .yarn/install-state.gz.
    • Added .nvmrc to specify Node 12 for local development consistency.
    • Updated devDependencies in package.json to include @testing-library/react, @testing-library/jest-dom, and msw.

Regression test suite

A minimal regression suite has been added to verify core UI behavior during the React upgrade.

  • Tooling: Jest + React Testing Library (RTL) + MSW
  • Current coverage: Loading component renders successfully within themed context
  • Run instructions:
    npm run jest -- --config regression-tests/jest.config.js --runInBand

Reasoning and impact

  • Establishes a foundation for regression tests to detect breaking changes as React is upgraded to 17.0.2.
  • Ensures basic rendering and theming continue to work (Loading component) while the upgrade proceeds.

Risks

  • Test environment and polyfills may require adjustment once React 17 upgrade changes land across the app.
  • MSW handlers are minimal; additional API mocks may be needed for broader coverage.

Follow-ups and reviewer call-outs

  • Expand regression coverage to additional components and flows impacted by the React upgrade.
  • Confirm Node version alignment (currently .nvmrc: 12) with CI and deployment environments.
  • Validate Babel/Jest config compatibility once React 17 and associated dependencies are updated.

Notes

  • This PR is a work in progress and is not intended to be merged yet.
  • This is a test PR and should not 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: prepare for React upgrade to 17.0.2 (WIP) chore: WIP React 17 upgrade and add regression test suite Nov 7, 2025
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