Skip to content

Commit

Permalink
Add a couple more type tests for other options with variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Dec 11, 2023
1 parent 482dc88 commit a768c9e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,8 @@ describe.skip("type tests", () => {
preloadQuery(query, { returnPartialData: true, variables: {} });
// @ts-expect-error unknown variables
preloadQuery(query, { variables: { foo: "bar" } });
// @ts-expect-error unknown variables
preloadQuery(query, { returnPartialData: true, variables: { foo: "bar" } });
});

test("does not allow variables when TVariables is `never`", () => {
Expand All @@ -1030,8 +1032,10 @@ describe.skip("type tests", () => {
preloadQuery(query);
preloadQuery(query, { variables: {} });
preloadQuery(query, { returnPartialData: true, variables: {} });
// @ts-expect-error no variables option allowed
// @ts-expect-error no variables allowed
preloadQuery(query, { variables: { foo: "bar" } });
// @ts-expect-error no variables allowed
preloadQuery(query, { returnPartialData: true, variables: { foo: "bar" } });
});

test("optional variables are optional", () => {
Expand Down

0 comments on commit a768c9e

Please sign in to comment.