test(svelte-query/useMutationState): add test for 'select' option in 'useMutationState'#10150
test(svelte-query/useMutationState): add test for 'select' option in 'useMutationState'#10150sukvvon wants to merge 1 commit intoTanStack:mainfrom
Conversation
…'useMutationState'
|
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughA new test component Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit 90e3a2f
☁️ Nx Cloud last updated this comment at |
🎯 Changes
Add a test for the
selectoption inuseMutationState, covering the truthy branch of theoptions.selectternary (options.select ? options.select(mutation) : mutation.state).Existing tests only called
useMutationStatewithoutselect, leaving theoptions.select(mutation)path uncovered.The new test verifies that
select: (mutation) => mutation.state.statuscorrectly extracts mutation status values ("pending"→"success").✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit