chore: upgrade vitest from v4 to v5 - #1746
Merged
Merged
Conversation
- 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)
jordan-a-young
requested review from
LauRoxx and
gregmartDOTin
as code owners
September 14, 2026 20:28
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades vitest and
@vitest/coverage-v8from v4.1.11 to v5.0.0.Changes
vitestand@vitest/coverage-v8:^4.1.11→^5.0.0vite@^8.0.0added as explicit devDependency — vitest v5 requires vite as a peer dep and it was previously only a transitive dependencypackages/select/tests/ResourceSelect.test.jsx: Fixed a latent test bug exposed by vitest v5's newclearMocks: truedefault — the'Queries using graphQl'test was assertingavRegionsApi.postGetwas called, but GraphQL queries go throughavRegionsApi.post. The assertion only passed in v4 becausepostGethad stale call history from a previous test..gitignore: Added.vitest/— vitest v5 writes artifacts (JSON/JUnit reporters, blob reports) to a.vitest/directory by defaultTesting
All 730 tests passing, 0 failures across 107 test files.