-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Upgrade to Vitest v4 #9862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Upgrade to Vitest v4 #9862
Conversation
|
WalkthroughLarge monorepo dependency and test infrastructure update. Vite bumped from ^6.3.6 to ^6.4.1 across ~40 example and integration package files. Root package.json updated with Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes
Areas requiring extra attention:
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
TkDodo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome. can you please fix the conflicts and I’ll try to ship it
|
|
||
| expect(queryFn).toHaveBeenCalledOnce() | ||
| expect(queryFn).toHaveBeenCalledWith(context) | ||
| expect(queryFn).toHaveBeenCalledExactlyOnceWith(context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh this is a nice new matcher 👍
|
|
||
| afterEach(() => { | ||
| vi.useRealTimers() | ||
| Fallback.mockClear() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what’s that doing?
🎯 Changes
Upgrade TanStack Query to use Vitest 4. Most changes were around mocks, testing functions being used and some config tweaks.
A few gotchas I am unsure about:
Please let me know if I have messed with things that should not be touched.
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit