test(lit-query/useMutationState): add test for returning the current mutation states when connected after a mutation started - #11803
Conversation
…mutation states when connected after a mutation started
|
View your CI Pipeline Execution ↗ for commit 2a3e617
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: TanStack/query/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe change adds a test that checks whether ChangesMutation state observation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Other Merge Risk: ⚪ Minimal · up to This test-only change adds coverage for observing an already-pending mutation after connection. No actionable merge-blocking risk is identified; merge after normal checks pass. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
size-limit report 📦
|
🎯 Changes
Adds "should return the current mutation states when connected after a mutation started" to
useMutationStatetests.A mutation is started before the host using
useMutationStatewith staticfilters({ status: 'pending' }) is connected. It asserts that the rendered output shows the pending mutation right after connecting, and then none once the mutation settles.Existing tests connected the host before mutating, or used a
selectfunction that recomputes the state on host updates, so none checked that the state is computed when the host connects.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit