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

Move remaining __tests__/QueryManager tests to ApolloClient and test with ApolloClient instance #12326

Merged
merged 21 commits into from
Jan 30, 2025
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
636d2ce
Copy over links test to ApolloClient
jerelmiller Jan 30, 2025
4b09210
Remove unneeded comments
jerelmiller Jan 30, 2025
e2832c6
Replace instantiation of QueryManager with instantiation of ApolloClient
jerelmiller Jan 30, 2025
e45798c
Include number of assertions in test
jerelmiller Jan 30, 2025
2035f7d
Replace instantiation of QueryManager with instantiation of ApolloClient
jerelmiller Jan 30, 2025
3e9dbbb
Replace instantiation of QueryManager with instantiation of ApolloClient
jerelmiller Jan 30, 2025
05066f1
Replace instantiation of QueryManager with instantiation of ApolloClient
jerelmiller Jan 30, 2025
3d98afc
Replace instantiation of QueryManager with instantiation of ApolloClient
jerelmiller Jan 30, 2025
1e35270
Replace instantiation of QueryManager with instantiation of ApolloClient
jerelmiller Jan 30, 2025
3107284
Flatten test with await
jerelmiller Jan 30, 2025
bc81ea5
Replace instantiation of QueryManager with instantiation of ApolloClient
jerelmiller Jan 30, 2025
7ce773e
Remove unused imports
jerelmiller Jan 30, 2025
595f1cd
Remove old QueryManager/links test
jerelmiller Jan 30, 2025
4bf2db4
Copy multiple-results to ApolloClient tests
jerelmiller Jan 30, 2025
c695f05
Replace instantiation of QueryManager with instantiation of ApolloClient
jerelmiller Jan 30, 2025
5c55c99
Replace instantiation of QueryManager with instantiation of ApolloClient
jerelmiller Jan 30, 2025
aff9e3f
Replace instantiation of QueryManager with instantiation of ApolloClient
jerelmiller Jan 30, 2025
2267e7c
Replace instantiation of QueryManager with instantiation of ApolloClient
jerelmiller Jan 30, 2025
5b92f5f
Replace instantiation of QueryManager with instantiation of ApolloClient
jerelmiller Jan 30, 2025
444b571
Remove unused imports
jerelmiller Jan 30, 2025
2f5139f
Remove old multiple-results tests
jerelmiller Jan 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace instantiation of QueryManager with instantiation of ApolloClient
  • Loading branch information
jerelmiller committed Jan 30, 2025
commit aff9e3fd768ff9cbdac34ffa6c607308e21df76f
16 changes: 7 additions & 9 deletions src/core/__tests__/ApolloClient/multiple-results.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,12 @@ describe("mutiple results", () => {
},
};
const link = new MockSubscriptionLink();
const queryManager = new QueryManager(
getDefaultOptionsForQueryManagerTests({
cache: new InMemoryCache({ addTypename: false }),
link,
})
);
const client = new ApolloClient({
cache: new InMemoryCache({ addTypename: false }),
link,
});

const observable = queryManager.watchQuery<any>({
const observable = client.watchQuery({
query,
variables: {},
errorPolicy: "ignore",
Expand All @@ -182,7 +180,7 @@ describe("mutiple results", () => {
// fire off first result
link.simulateResult({ result: { data: initialData } });

await expect(stream).toEmitValue({
await expect(stream).toEmitApolloQueryResult({
data: initialData,
loading: false,
networkStatus: 7,
Expand All @@ -196,7 +194,7 @@ describe("mutiple results", () => {
},
});

await expect(stream).toEmitValueStrict({
await expect(stream).toEmitApolloQueryResult({
data: laterData,
loading: false,
networkStatus: 7,
Expand Down