test(lit-query): create 'queryClient' in 'beforeEach' and drop unneeded 'retry: false' default options - #11677
Conversation
…ed 'retry: false' default options
|
View your CI Pipeline Execution ↗ for commit 3bb4d49
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: TanStack/query/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (9)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe Lit query test suites now create and clear shared ChangesLit query test updates
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Change: Other Merge Risk: ⚪ Minimal · up to The Lit query test setup changes do not establish a production behavior change or a test regression. The PR is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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
Aligns the
lit-querytests'QueryClientsetup with the other adapters' tests (e.g.react-query):let queryClient: QueryClientin the top-leveldescribes, creates it inbeforeEach(aftervi.useFakeTimers()) and callsqueryClient.clear()inafterEach(beforevi.useRealTimers()).type-inference.test.tsdoes the same without fake timers, andclient-switch-controllers.test.tskeeps creating its two clients in each test because every test there switches between them.queryClient. Tests that need several clients (switching between providers, or an explicit client compared with a provider client) still create the extra clients inline.defaultOptions: { queries: { retry: false } }(andmutations: { retry: false }) from the clients. Only two tests have a failing query, so they now setretry: falseon that query instead.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit