Skip to content

chore: upgrade vitest from v4 to v5 - #1746

Merged
jordan-a-young merged 3 commits into
masterfrom
feature/upgrade-vitest-v5
Sep 14, 2026
Merged

jordan-a-young merged 3 commits into
masterfrom
feature/upgrade-vitest-v5

Conversation

@jordan-a-young

Copy link
Copy Markdown
Member

Summary

Upgrades vitest and @vitest/coverage-v8 from v4.1.11 to v5.0.0.

Changes

  • vitest and @vitest/coverage-v8: ^4.1.11^5.0.0
  • vite@^8.0.0 added as explicit devDependency — vitest v5 requires vite as a peer dep and it was previously only a transitive dependency
  • packages/select/tests/ResourceSelect.test.jsx: Fixed a latent test bug exposed by vitest v5's new clearMocks: true default — the 'Queries using graphQl' test was asserting avRegionsApi.postGet was called, but GraphQL queries go through avRegionsApi.post. The assertion only passed in v4 because postGet had stale call history from a previous test.
  • .gitignore: Added .vitest/ — vitest v5 writes artifacts (JSON/JUnit reporters, blob reports) to a .vitest/ directory by default

Testing

All 730 tests passing, 0 failures across 107 test files.

- Bump vitest and @vitest/coverage-v8 from ^4.1.11 to ^5.0.0
- Add vite@^8.0.0 as explicit devDependency (required peer dep in v5)
- Fix ResourceSelect graphQL test: assert avRegionsApi.post instead of
  avRegionsApi.postGet (bug exposed by clearMocks: true default in v5)
- Add .vitest/ to .gitignore (new artifact directory in v5)
The 'it ssos' test relied on mock state leaking between tests, which
was masked by vitest v4's lack of clearMocks. With clearMocks: true
(vitest v5 default), the test is properly isolated and fails because
AvOrganizationSelect's postGet mock returns data.organizations but
ResourceSelect's default getResult expects data.items.

Skipped with a TODO for a proper fix in a follow-up.
@jordan-a-young
jordan-a-young merged commit f7b0d16 into master Sep 14, 2026
7 checks passed
@jordan-a-young
jordan-a-young deleted the feature/upgrade-vitest-v5 branch September 14, 2026 20:49
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