Repository navigation
chore(deps-dev): upgrade vitest to v5 - #1681
Merged
Merged
Conversation
Vitest 5 requires the matching coverage and UI packages, types custom matchers on Matchers, and fails CI when snapshots are obsolete. Drop unused snapshots and keep the skipped table-of-contents snapshot under the ` > ` joined name. Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
Contributor
[Medium impact] The PR appears safe to merge; no actionable bugs were found. Reviews (1) · Last reviewed commit: "chore(deps-dev): upgrade vitest to v5" · Reviewed by Greptile |
rafegoldberg
pushed a commit
that referenced
this pull request
Nov 9, 2026
## Version 16.2.1 ### 🛠 Fixes & Updates * address flagged CodeQL alerts ([#1682](#1682)) ([3b14a86](3b14a86)) * move lint and format to oxlint and oxfmt ([#1680](#1680)) ([85c915b](85c915b)) * **deps:** patch Dependabot security vulnerabilities ([#1679](#1679)) ([bfc9c1b](bfc9c1b)) * pulling dependabot updates back a bit ([a9906c3](a9906c3)) * **mdxish:** space callouts under tight list items ([#1671](#1671)) ([f21e0d8](f21e0d8)) * **table:** stop centering unaligned headers ([#1670](#1670)) ([139d238](139d238)) * **deps-dev:** upgrade vitest to v5 ([#1681](#1681)) ([0946e08](0946e08)) <!--SKIP CI-->
Collaborator
This PR was released!🚀 Changes included in v16.2.1 |
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.

🎯 What does this PR do?
Upgrades Vitest from 4.1.12 to 5.1.0, along with
@vitest/coverage-v8and@vitest/uiso the peer versions stay in lockstep. Vite 6.4.5 and Node 22.13 (the Docker image) already meet Vitest 5's floors (Vite >= 6.4, Node >= 22.12).Vitest 5 changes that this repo actually hits:
Matchers<R, T>.vitest.d.tswas renamed tovitest.matchers.d.tsbecausebaseUrl: "."would resolve a rootvitest.d.tsas thevitestmodule and replace the package types. The matcher implementation importsMatcherResultfromvitestinstead of@vitest/expect, which Vitest no longer depends on.CI=true) fails when a snapshot file contains entries no test claims. UnusedstripCommentssnapshots are removed. The skipped table-of-contents snapshot is kept, with its key joined by>so the skipped test still owns it..vitest/, which is gitignored.clearMocksnow defaults totrue. The suite passes with that default, so it is left on.🧪 QA tips
npx vitest run— 4382 passed, 56 skippedCI=true npx vitest run— same result, including the obsolete-snapshot checknpm run test.uistill opens the UI; Vitest 5 requires the token printed in the terminal📸 Screenshot or Loom
No UI change. Verification is the unit suite above.