Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
CarsonF committed Mar 5, 2024
1 parent 8f16d42 commit 810ae38
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
@@ -0,0 +1 @@
select <array<tuple<str, str>>>$deep;
28 changes: 28 additions & 0 deletions integration-tests/lts/queries.test.ts
Expand Up @@ -6,6 +6,8 @@ import {
getMoviesStarring,
type GetMoviesStarringArgs,
type GetMoviesStarringReturns,
deepArrayInput,
type DeepArrayInputArgs,
} from "./dbschema/queries";
import { setupTests, teardownTests } from "./setupTeardown";

Expand Down Expand Up @@ -68,4 +70,30 @@ describe("queries", () => {

tc.assert<tc.IsExact<GetMoviesStarringReturns, result>>(true);
});

test("deep array input", async () => {
const result = await deepArrayInput(client, {
deep: [
['name', 'Stark'],
['color', 'red'],
] as const,
});

type result = typeof result;
tc.assert<
tc.IsExact<
result,
Array<[string, string]>
>
>(true);

tc.assert<
tc.IsExact<
DeepArrayInputArgs,
{
deep: ReadonlyArray<readonly [string, string]>;
}
>
>(true);
});
});

0 comments on commit 810ae38

Please sign in to comment.