test(angular-query/query-options): add type tests for 'getQueryState' and 'skipToken' inference - #11465
test(angular-query/query-options): add type tests for 'getQueryState' and 'skipToken' inference#11465sukvvon wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe Angular type-test suite adds assertions for tagged query state and ChangesAngular query type coverage
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change expands Angular query-option type coverage without changing runtime behavior or published implementation. No current merge-blocking risk is identified. Suggested reviewers: 🚥 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 |
|
View your CI Pipeline Execution ↗ for commit 73612c4
☁️ Nx Cloud last updated this comment at |
size-limit report 📦
|
🚀 Changeset Version Preview2 package(s) bumped directly, 23 bumped as dependents. 🟨 Minor bumps
🟩 Patch bumps
|
… and 'skipToken' inference
cb54331 to
73612c4
Compare
🎯 Changes
angular-query-experimental'squery-options.test-d.tswas missing three cases thatreact-query,preact-query,solid-queryandsvelte-queryalready cover in theirqueryOptionstype tests. This ports them over.should return the proper type when passed to getQueryState— asserts the tagged query key narrowsstate?.datatonumber | undefined. Placed right after the existinggetQueryDatacase, matching where the other adapters put it.should infer even if there is a conditional skipToken— aqueryFnthat is eitherskipTokenor a real function still infersnumber | undefined.should infer to unknown if we disable a query with just a skipToken— aqueryFnthat is onlyskipTokeninfersunknown.Each one was checked by changing the input rather than the expected type: flipping the
queryFnresult type (or replacingskipTokenwith a real function) makes the corresponding assertion fail, so all three react to what they claim to test.Type tests only — no runtime or published code is touched.
✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit