test(query-core): add type check tests for queryObserver#8304
Merged
TkDodo merged 2 commits intoTanStack:mainfrom Dec 2, 2024
saul-atomrigs:tests/query-observer-result-types
Merged
test(query-core): add type check tests for queryObserver#8304TkDodo merged 2 commits intoTanStack:mainfrom saul-atomrigs:tests/query-observer-result-types
queryObserver#8304TkDodo merged 2 commits intoTanStack:mainfrom
saul-atomrigs:tests/query-observer-result-types
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit e59132c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 2 targetsSent with 💌 from NxCloud. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8304 +/- ##
===========================================
+ Coverage 46.12% 62.90% +16.78%
===========================================
Files 200 136 -64
Lines 7504 4799 -2705
Branches 1716 1346 -370
===========================================
- Hits 3461 3019 -442
+ Misses 3668 1540 -2128
+ Partials 375 240 -135 |
TkDodo
approved these changes
Dec 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request includes updates to the
queryObservertests to enhance type checking.In detail, I added type checks for various properties of the
resultobject, such asisError,isPending,isLoading,isLoadingError,isRefetchError, andisSuccessto ensure they are of the correct types in different states.Source of the types:
query/packages/query-core/src/types.ts
Lines 746 to 818 in fadfbde