test(query-core/queriesObserver): add test for subscribing new observers when a query is added while subscribed#10246
Conversation
…ers when a query is added while subscribed
|
|
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 (1)
📝 WalkthroughWalkthroughThis PR adds a test to QueriesObserver that verifies correct behavior when new queries are dynamically added to an observer after initial subscription, including handling of delayed async resolvers. The test confirms all queries' results are properly emitted. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 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 1842ae3
☁️ Nx Cloud last updated this comment at |
🎯 Changes
Add a test for
queriesObserver.tslines 150-151 — subscribing new observers whensetQueriesadds a query while theQueriesObserveralready has listeners.The test verifies that when a new query is added via
setQueriesduring an active subscription, the new observer is automatically subscribed and its fetch result is properly propagated through#onUpdateto the listener.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit