Skip to content

Commit

Permalink
fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sawyer Burnett committed Mar 15, 2024
1 parent 9b5c915 commit 75283ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ describe("projection-types", () => {
expectTypeOf<ProjectionKeyValue<Item, "nested.arr[]">>().toEqualTypeOf<
Array<number>
>();
// @ts-expect-error -- Currently this isn't supported, so it's cast as 'never'
expectTypeOf<ProjectionKeyValue<Item, "optional.str">>().toEqualTypeOf<
// @ts-expect-error -- Currently this isn't supported, so it's cast as 'never'
string | null
>();
});
Expand Down
13 changes: 8 additions & 5 deletions packages/groq-builder/src/makeSafeQueryRunner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ describe("makeSafeQueryRunner", () => {
it("should have correctly-typed extra parameters", () => {
makeSafeQueryRunner<{ foo: "FOO"; bar?: "BAR" }>(async (query, options) => {
expectTypeOf(query).toEqualTypeOf<string>();
expectTypeOf(options).toEqualTypeOf<{
parameters: {} | undefined;
foo: "FOO";
bar?: "BAR";
}>();
expectTypeOf(options).toEqualTypeOf<
{
parameters: {} | undefined;
} & {
foo: "FOO";
bar?: "BAR" | undefined;
}
>();
return null;
});
});
Expand Down

0 comments on commit 75283ff

Please sign in to comment.