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

Remove itAsync part 1 #12182

Merged
merged 30 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
25617fe
Remove itAsync from useMutation tests
jerelmiller Nov 30, 2024
c9d5467
Remove itAsync from useReactiveVar tests
jerelmiller Nov 30, 2024
1e08c42
Remove itAsync from HttpLink tests
jerelmiller Nov 30, 2024
ea73797
Remove itAsync from ApolloConsumer tests
jerelmiller Nov 30, 2024
4802fd0
Remove itAsync from webSocketLink tests
jerelmiller Nov 30, 2024
e66e7a1
Add ability to unsubscribe from observable in ObservableStream
jerelmiller Dec 2, 2024
091c7fd
Remove itAsync from persisted-queries tests
jerelmiller Dec 2, 2024
a4127bf
Remove itAsync from fragmentMatcher tests
jerelmiller Dec 2, 2024
2a16313
Remove itAsync from link/error tests
jerelmiller Dec 2, 2024
cdadb6f
Remove itAsync from client tests
jerelmiller Dec 5, 2024
b8242b4
Remove itAsync from writeToStore tests
jerelmiller Dec 5, 2024
fa83b8e
Allow toEmitError to compare error string
jerelmiller Dec 5, 2024
6eb840b
Remove itAsync from link/context tests
jerelmiller Dec 5, 2024
45792a2
Remove itAsync from ApolloClient tests
jerelmiller Dec 6, 2024
243d775
Remove itAsync from getDataFromTree tests
jerelmiller Dec 6, 2024
8fdd503
Remove itAsync from batchHttpLink tests
jerelmiller Dec 6, 2024
5b1f7a5
Remove itAsync from batchLink tests
jerelmiller Dec 7, 2024
4e642d6
Remove itAsync from fetchPolicies tests
jerelmiller Dec 7, 2024
3f66241
Remove itAsync from asyncMap tests
jerelmiller Dec 7, 2024
305a7e0
Remove itAsync from QueryManager/links tests
jerelmiller Dec 7, 2024
41b0905
Remove itAsync from local-state/resolvers tests
jerelmiller Dec 7, 2024
9e6efd1
Rename assertWithObserver to setupTestWithResolvers
jerelmiller Dec 7, 2024
5feb605
Remove itAsync from local-state/general tests
jerelmiller Dec 7, 2024
701d1a0
Use expect(...).rejects to check for errors
jerelmiller Dec 9, 2024
5019939
Ensure promise is awaited on assertion
jerelmiller Dec 9, 2024
e9d84ba
Default to false for boolean
jerelmiller Dec 9, 2024
ae8a237
Use .rejects instead of catch on promise
jerelmiller Dec 11, 2024
77c5aaa
Use default value of false for called variable
jerelmiller Dec 11, 2024
95ac564
Add void for more promises that need it
jerelmiller Dec 12, 2024
c66675e
Merge branch 'main' into jerel/remove-itasync-part-1
jerelmiller Dec 12, 2024
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
475 changes: 207 additions & 268 deletions src/__tests__/ApolloClient.ts

Large diffs are not rendered by default.

4,017 changes: 1,854 additions & 2,163 deletions src/__tests__/client.ts

Large diffs are not rendered by default.

1,406 changes: 654 additions & 752 deletions src/__tests__/local-state/general.ts

Large diffs are not rendered by default.

1,450 changes: 647 additions & 803 deletions src/__tests__/local-state/resolvers.ts

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions src/cache/inmemory/__tests__/fragmentMatcher.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import gql from "graphql-tag";

import { itAsync } from "../../../testing";
import { InMemoryCache } from "../inMemoryCache";
import { visit, FragmentDefinitionNode } from "graphql";
import { hasOwn } from "../helpers";
Expand Down Expand Up @@ -242,7 +241,7 @@ describe("policies.fragmentMatches", () => {
console.warn = warn;
});

itAsync("can infer fuzzy subtypes heuristically", (resolve, reject) => {
it("can infer fuzzy subtypes heuristically", async () => {
const cache = new InMemoryCache({
possibleTypes: {
A: ["B", "C"],
Expand Down Expand Up @@ -279,7 +278,7 @@ describe("policies.fragmentMatches", () => {
FragmentDefinition(frag) {
function check(typename: string, result: boolean) {
if (result !== cache.policies.fragmentMatches(frag, typename)) {
reject(
throw new Error(
`fragment ${frag.name.value} should${
result ? "" : " not"
} have matched typename ${typename}`
Expand Down Expand Up @@ -577,7 +576,5 @@ describe("policies.fragmentMatches", () => {
},
}).size
).toBe("ABCDEF".length);

resolve();
});
});
Loading
Loading