Skip to content

Commit

Permalink
add .length type test
Browse files Browse the repository at this point in the history
  • Loading branch information
samchungy committed Aug 16, 2023
1 parent 9539623 commit 68771b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deno/lib/__tests__/array.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ util.assertEqual<[string, ...string[]], t1>(true);
type t2 = z.infer<typeof minTwo>;
util.assertEqual<[string, string, ...string[]], t2>(true);

type t3 = z.infer<typeof justTwo>;
util.assertEqual<[string, string], t3>(true);

test("passing validations", () => {
minTwo.parse(["a", "a"]);
minTwo.parse(["a", "a", "a"]);
Expand Down
3 changes: 3 additions & 0 deletions src/__tests__/array.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ util.assertEqual<[string, ...string[]], t1>(true);
type t2 = z.infer<typeof minTwo>;
util.assertEqual<[string, string, ...string[]], t2>(true);

type t3 = z.infer<typeof justTwo>;
util.assertEqual<[string, string], t3>(true);

test("passing validations", () => {
minTwo.parse(["a", "a"]);
minTwo.parse(["a", "a", "a"]);
Expand Down

0 comments on commit 68771b9

Please sign in to comment.