Uh oh!
There was an error while loading. Please reload this page.
test(query-core/utils): add tests for 'undefined' key properties and 'isValidTimeout' validation - #11013
Conversation
Clarify isValidTimeout with Number.isFinite, add regression tests for undefined query-key object properties, and fix TanStack branding in community resources.
📝 WalkthroughWalkthroughUpdates ChangesisValidTimeout Validation Update
Documentation Fix
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
View your CI Pipeline Execution ↗ for commit a1c97b2
☁️ Nx Cloud last updated this comment at |
🎯 Changes
Adds tests for
query-coreutils behavior that was executed but never asserted:hashKey/partialMatchKey: query key objects withundefined-valued properties are treated the same as objects without those properties.isValidTimeout: accepts finite non-negative numbers and rejects-1,NaN,Infinity, non-numbers andundefined. This function gatesstaleTime,gcTimeandrefetchInterval, but had no direct test coverage.✅ Checklist
pnpm run test:pr.🚀 Release Impact