Skip to content
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

Refactor useQuery tests to use toEqualQueryResult - Part 1 #12273

Merged
merged 23 commits into from
Jan 16, 2025

Conversation

jerelmiller
Copy link
Member

Similar to #12260, this refactors useQuery tests to use the new toEqualQueryResult matcher. There are many tests in this suite, so this is the first of a series of PRs to make PR review a bit more digestable.

@jerelmiller jerelmiller requested a review from phryneas January 14, 2025 21:19
Copy link

changeset-bot bot commented Jan 14, 2025

⚠️ No Changeset found

Latest commit: 955d0af

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@svc-apollo-docs
Copy link

svc-apollo-docs commented Jan 14, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 140cd8b870bff27818275f29

Copy link

pkg-pr-new bot commented Jan 14, 2025

npm i https://pkg.pr.new/@apollo/client@12273

commit: 955d0af

});

// TODO: Refactor this test. This test does not test the thing it says it
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My plan is to leave as many of these TODO comments in these series of PRs as I discover things, then come back in a separate PR to do them. Please take a look at anything with a TODO comment and let me know if you disagree.

@jerelmiller jerelmiller changed the title Refactor useQuery tests to use toEqualQueryResult part 1 Refactor useQuery tests to use toEqualQueryResult - Part 1 Jan 14, 2025
Base automatically changed from jerel/refactor-uselazyquery-tests to main January 16, 2025 17:31
@jerelmiller jerelmiller force-pushed the jerel/refactor-usequery-tests branch from 5a9a280 to 955d0af Compare January 16, 2025 17:38
Copy link

netlify bot commented Jan 16, 2025

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit 955d0af
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/6789442eb3397b000801b548
😎 Deploy Preview https://deploy-preview-12273--apollo-client-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 40.66 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" 50.07 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" (production) 47.18 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" 36.18 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production) 33.58 KB (0%)
import { ApolloProvider } from "dist/react/index.js" 1.26 KB (0%)
import { ApolloProvider } from "dist/react/index.js" (production) 1.24 KB (0%)
import { useQuery } from "dist/react/index.js" 5.21 KB (0%)
import { useQuery } from "dist/react/index.js" (production) 4.29 KB (0%)
import { useLazyQuery } from "dist/react/index.js" 5.7 KB (0%)
import { useLazyQuery } from "dist/react/index.js" (production) 4.78 KB (0%)
import { useMutation } from "dist/react/index.js" 3.62 KB (0%)
import { useMutation } from "dist/react/index.js" (production) 2.84 KB (0%)
import { useSubscription } from "dist/react/index.js" 4.42 KB (0%)
import { useSubscription } from "dist/react/index.js" (production) 3.48 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" 5.51 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" (production) 4.17 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" 5.01 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" (production) 3.66 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" 5.09 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" (production) 3.74 KB (0%)
import { useReadQuery } from "dist/react/index.js" 3.41 KB (0%)
import { useReadQuery } from "dist/react/index.js" (production) 3.35 KB (0%)
import { useFragment } from "dist/react/index.js" 2.36 KB (0%)
import { useFragment } from "dist/react/index.js" (production) 2.31 KB (0%)

@jerelmiller jerelmiller merged commit d203204 into main Jan 16, 2025
46 checks passed
@jerelmiller jerelmiller deleted the jerel/refactor-usequery-tests branch January 16, 2025 17:43
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.

2 participants