test(query-core/mutation): add test for 'optionalRemove' when remaining observer exists#10127
Conversation
…ng observer exists
|
|
Caution Review failedAn error occurred during the review process. Please try again later. 📝 WalkthroughWalkthroughA new test case is added to verify that unsubscribing one observer from a mutation does not remove the underlying mutation when additional observers remain registered. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ 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 a205ed3
☁️ Nx Cloud last updated this comment at |
…-remaining-observer
…-remaining-observer
🎯 Changes
Add a test case for
Mutation.optionalRemoveto cover the branch where one observer is removed but another still exists, ensuring the mutation is retained in the cache.scheduleGcis triggeredgcTimeelapses,optionalRemovechecksthis.#observers.length✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit