test(query-core/queryObserver): add test for 'refetchInterval' as a function refetching at the returned interval#10899
Conversation
…unction refetching at the returned interval
|
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 case to ChangesQuery refetchInterval function test
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit 1eaac1d
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ 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. |
size-limit report 📦
|
🎯 Changes
Adds a test in
queryObserver.test.tsxcovering the function form ofrefetchInterval.Existing
refetchIntervaltests only use the number form (refetchInterval: 10). This test verifies that whenrefetchIntervalis a function, the returned interval is actually applied, asserting the query refetches at that interval via thecountside effect.This covers the previously uncovered branch in
#computeRefetchIntervalwhererefetchIntervalis called as a function.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
refetchIntervalfunctionality to verify support for function-based interval values.