-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(query-core): add type check tests for queryObserver
#8304
test(query-core): add type check tests for queryObserver
#8304
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 |
This pull request includes updates to the
queryObserver
tests to enhance type checking.In detail, I added type checks for various properties of the
result
object, such asisError
,isPending
,isLoading
,isLoadingError
,isRefetchError
, andisSuccess
to 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