test(lit-query/createMutationController): split combined 'mutate'/'mutateAsync' and state transition tests into separate tests - #11773
Conversation
…tateAsync' and state transition tests into separate tests
|
View your CI Pipeline Execution ↗ for commit 86ce014
☁️ 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; 5 remain after this review. 📝 WalkthroughWalkthroughThe mutation controller tests now separate ChangesMutation controller tests
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Merge Risk: ⚪ Minimal · up to The change separates mutation tests without changing runtime behavior. 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
Splits two tests in
createMutationController.test.tsthat each covered two independent flows:should support mutate and mutateAsync pathsbecomes:should resolve mutateAsync with the mutation datashould update the result when mutate succeedsshould cover idle/pending/success/error mutation state transitionsbecomes:should transition from idle to pending to successshould transition from pending to error when the mutation failsEach test starts from a fresh host. Because the error flow no longer runs after the success flow, it now waits with
vi.advanceTimersByTimeAsync(0)before assertingisPending, as the success flow already does.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit