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 3a09b7e commit e6cc972
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Expand Up @@ -11,5 +11,5 @@ select Movie {
version := sys::get_version(),
range := range(123, 456),
local_date := <cal::local_date>'2022-09-08',
} filter .characters.name = <optional str>$name;

} filter .characters.name = <optional str>$name
and .release_year in array_unpack(<array<year>>$years);
6 changes: 5 additions & 1 deletion integration-tests/lts/queries.test.ts
Expand Up @@ -22,7 +22,10 @@ describe("queries", () => {
});

test("basic select", async () => {
const result = await getMoviesStarring(client, { name: "Iron Man" });
const result = await getMoviesStarring(client, {
name: "Iron Man",
years: [2012, 2016] as const, // readonly arrays accepted
});

type result = typeof result;
tc.assert<
Expand Down Expand Up @@ -58,6 +61,7 @@ describe("queries", () => {
GetMoviesStarringArgs,
{
name?: string | null;
years: readonly number[];
}
>
>(true);
Expand Down

0 comments on commit e6cc972

Please sign in to comment.