test(preact-query/useQueries): add test for not fetching during restoring period when 'isRestoring' is true#10197
Conversation
…ring period when 'isRestoring' is true
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds test coverage to verify that the useQueries hook does not initiate any fetch operations during the isRestoring period. Two test cases validate that queries remain pending with idle fetchStatus and undefined data while restoration is active, using IsRestoringProvider to simulate the restoration state. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
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 ed29a4b
☁️ Nx Cloud last updated this comment at |
🎯 Changes
Add tests to cover the
isRestoringbranch inuseQueries.ts(lines 235, 271).When
IsRestoringProviderprovidestrue, queries should remain inpendingstatus withfetchStatus: 'idle'and never callqueryFn, even after the query's sleep duration has elapsed.Two test cases added:
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit