Skip to content

chore: migrate vitest and coverage-v8 to v5 - #933

Merged
jordan-a-young merged 5 commits into
mainfrom
chore/vitest-v5-migration
Sep 15, 2026
Merged

jordan-a-young merged 5 commits into
mainfrom
chore/vitest-v5-migration

Conversation

@jordan-a-young

Copy link
Copy Markdown
Member

Summary

Migrates vitest and @vitest/coverage-v8 from ^4.1.11 to ^5.0.0 and cleans up all resulting test warnings.

Changes

Dependency upgrades

  • vitest5.0.0
  • @vitest/coverage-v85.0.0

Config

  • vitest.config.ts: import from vitest/config, remove triple-slash reference, add explicit reportsDirectory: './coverage' to keep coverage path stable
  • .gitignore: add .vitest/ for vitest v5's new artifact directory

Source bug fixes

  • MultiPayerModal: add missing key prop on mapped payer space Box elements
  • Disclaimer: add shouldForwardProp for accent/dense to prevent boolean props leaking to the DOM; add descriptionComponent prop so callers can override the Typography wrapper element
  • SpacesDisclaimer: pass descriptionComponent="div" when markdown={true} to prevent invalid <h1> inside <p> hydration error
  • FavoriteHeart: add shouldForwardProp for customSize on all three styled components to prevent it reaching the DOM

Test fixes

  • Table tests (7 files): wrap sub-components in valid HTML ancestor structure to eliminate React 19 hydration warnings
  • FeedbackForm.test: switch to userEvent.setup() + await, flush autoFocus ripple with act()
  • Select.test: pass value="" on uncontrolled render to avoid MUI out-of-range warning
  • StepContent.test: stub ResizeObserver and wrap in vertical Stepper context

Test Results

All 163 test files (381 tests) pass with zero stderr warnings.

- Bump vitest and @vitest/coverage-v8 from ^4.1.11 to ^5.0.0
- Update vitest.config.ts: import from vitest/config, remove triple-slash
  reference, add explicit reportsDirectory to keep coverage path stable
- Add .vitest/ to .gitignore for new v5 artifact directory

Fix DOM prop warnings (shouldForwardProp):
- Disclaimer: add shouldForwardProp for accent/dense on AvDisclaimer styled div
- Disclaimer: add descriptionComponent prop to allow callers to override the
  Typography wrapper element (used by SpacesDisclaimer when markdown=true)
- FavoriteHeart: add shouldForwardProp for customSize on all three styled
  components (FavoriteHeartContainer, FavoriteInput, FavoriteIcon)

Fix source bugs:
- MultiPayerModal: add missing key prop on mapped payer space Box elements
- SpacesDisclaimer: pass descriptionComponent='div' when markdown=true to
  prevent invalid <h1> inside <p> hydration error

Fix test setup issues:
- Table tests (7 files): wrap sub-components in valid HTML ancestor structure
  to eliminate React 19 hydration warnings
- FeedbackForm.test: switch to userEvent.setup() + await, flush autoFocus
  ripple with act() to eliminate act() warnings
- Select.test: pass value='' on uncontrolled render to avoid MUI out-of-range
  warning
- StepContent.test: stub ResizeObserver and wrap in vertical Stepper context
  to eliminate MUI design-usage warning

All 163 test files (381 tests) pass with zero stderr warnings.
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview deployed!

📖 View Storybook Preview

- Move Nx cache restore before yarn install in all jobs
- Add NX_DAEMON=false to prevent daemon fork attempts in CI
- Upload build artifacts in setup job, download in downstream jobs
  to avoid redundant rebuilds across publish and deploy-docs
- Parallelize deploy-docs with publish by depending on setup instead
  of waiting for publish to complete
Add Node 24 setup with yarn cache before yarn install, matching
the pattern in sdk-js repo-metrics.yml
Only breaking change in jsdom 30 is Node.js minimum raised to
^22.22.2 || ^24.15.0 || >=26.0.0, which is satisfied by CI matrix.
All 381/974/729 tests passing.
- actions/upload-artifact: v4 (floating) -> v7.0.1 (SHA pinned)
- actions/download-artifact: v4 (floating) -> v8.0.1 (SHA pinned)
- actions/upload-pages-artifact: v3.0.1 -> v5.0.0
- actions/deploy-pages: v4.0.5 -> v5.0.1

All updated versions run on Node.js 24, eliminating the Node.js 20
deprecation warnings seen in CI. Also pins floating @v4 tags to
exact SHAs for consistency with the rest of the workflow files.
@jordan-a-young
jordan-a-young merged commit 16495bd into main Sep 15, 2026
9 checks passed
github-actions Bot pushed a commit that referenced this pull request Sep 15, 2026
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