test(solid-query/useQuery): add test for string 'reconcile' option maintaining referential equality#10169
Conversation
…intaining referential equality
|
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughTwo test cases are added to validate that when the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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 0b0f835
☁️ Nx Cloud last updated this comment at |
🎯 Changes
Add a test to cover the string
reconcileoption path inreconcileFn(useBaseQuery.ts, lines 41-59).The test verifies that when
reconcile: 'id'is used:id: '2'done:false→true), Solid'sreconcileupdates items in-placecreateEffectis not triggered again (statesstays at length 1)The existing test (
should share equal data structures between query results) covers the function callback path (reconcile: (oldData, newData) => ..., lines 37-39), but the string key path (lines 41-59) was previously uncovered.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit