Skip to content

fix(tests): add type tests for useQueries#6471

Merged
TkDodo merged 1 commit into
TanStack:mainfrom
charlotte-bone:fix/queries-types
Dec 2, 2023
Merged

fix(tests): add type tests for useQueries#6471
TkDodo merged 1 commit into
TanStack:mainfrom
charlotte-bone:fix/queries-types

Conversation

@charlotte-bone

Copy link
Copy Markdown
Contributor

Creating new useQueries type tests in react-query and vue-query and fixing a couple of type bugs.

discussed in #6442

Creating new useQueries type tests in react-query and vue-query and fixing a couple of type bugs.
@vercel

vercel Bot commented Dec 1, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
query ⬜️ Ignored (Inspect) Visit Preview Dec 1, 2023 8:44pm

@nx-cloud

nx-cloud Bot commented Dec 1, 2023

Copy link
Copy Markdown

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 7c2e6dc. 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 1 target

Sent with 💌 from NxCloud.

@codesandbox-ci

codesandbox-ci Bot commented Dec 1, 2023

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7c2e6dc:

Sandbox Source
@tanstack/query-example-angular-basic Configuration
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-svelte-basic Configuration
@tanstack/query-example-vue-basic Configuration

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (23374bb) 87.83% compared to head (7c2e6dc) 93.50%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6471      +/-   ##
==========================================
+ Coverage   87.83%   93.50%   +5.66%     
==========================================
  Files          87       20      -67     
  Lines        2926      277    -2649     
  Branches      803       68     -735     
==========================================
- Hits         2570      259    -2311     
+ Misses        297       16     -281     
+ Partials       59        2      -57     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@charlotte-bone

Copy link
Copy Markdown
Contributor Author

Writing the tests flagged up some typing issues. In both vue-query and react-query, | undefined was always returned, even if initialData was set. In vue-query, it didn't support passing queryOptions through.

@TkDodo

TkDodo commented Dec 2, 2023

Copy link
Copy Markdown
Collaborator

yeah we never got to the point where initialData removed undefined for userQueries as well ❤️

@TkDodo TkDodo merged commit b54936f into TanStack:main Dec 2, 2023
@charlotte-bone charlotte-bone deleted the fix/queries-types branch December 7, 2023 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants