test(preact-query/useSuspenseQuery): add regression tests for suspense release on programmatic 'setQueryData' - #11248
Conversation
…e release on programmatic 'setQueryData'
|
View your CI Pipeline Execution ↗ for commit 27ed1c2
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview10 package(s) bumped directly, 15 bumped as dependents. 🟨 Minor bumps
🟩 Patch bumps
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe test suite now covers how ChangesSuspense query tests
Estimated code review effort: 2 (Simple) | ~15 minutes Merge Risk: ⚪ Minimal · up to This change adds regression tests without modifying published runtime behavior or production configuration, so no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
size-limit report 📦
|
🎯 Changes
Port the four regression tests added to
react-query'suseSuspenseQuery.test.tsxin #11036 topreact-query. The underlying fix lives inpackages/query-core/src/queryObserver.ts(fetchOptimistic), sopreact-queryalready gets the runtime behavior for free — this PR only adds equivalent test coverage:should release suspense when setQueryData is called while fetch is in-flightshould release suspense when streamedQuery receives first chunkshould release suspense when setQueryData is called before component mountsshould NOT release suspense when setQueryData is called with undefined✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit