Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
CarsonF committed Mar 4, 2024
1 parent bbec5f9 commit d031fed
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<Array<string>>
>
>(true);

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

0 comments on commit d031fed

Please sign in to comment.