test(query-core): replace deprecated 'toBeCalledWith' and 'toBeCalledTimes' with 'toHaveBeenCalledWith' and 'toHaveBeenCalledTimes'#10936
Conversation
…Times' with 'toHaveBeenCalledWith' and 'toHaveBeenCalledTimes'
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughFour test files in ChangesVitest Matcher Standardization
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx affected --targets=test:sherif,test:knip,tes... |
❌ Failed | 2m 8s | View ↗ |
nx run-many --target=build --exclude=examples/*... |
✅ Succeeded | 11s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-06-14 12:33:15 UTC
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
size-limit report 📦
|

🎯 Changes
Replace the deprecated assertion aliases
toBeCalledWithandtoBeCalledTimeswith their recommended counterpartstoHaveBeenCalledWithandtoHaveBeenCalledTimesacross the query-core test suite.Both aliases are flagged
@deprecatedby@vitest/expect's type definitions, which point to the replacements used here:toBeCalledWith→toHaveBeenCalledWithtoBeCalledTimes→toHaveBeenCalledTimesAffected files:
query.test.tsxqueriesObserver.test.tsxinfiniteQueryObserver.test.tsxmutationObserver.test.tsx✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
Release Notes