Skip to content

Commit

Permalink
variadic tuples: add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gvergnaud committed Feb 22, 2023
1 parent 4c02ce7 commit c07c4fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/variadic-tuples.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ describe('variadic tuples ([a, ...b[]])', () => {
.with([P.any, ...P.array()], () => 'non empty')
.otherwise(() => 'empty');

expect(f([])).toBe('empty');
expect(f([1])).toBe('non empty');
expect(f([1, 2])).toBe('non empty');
expect(f([1, 2, 3])).toBe('non empty');
Expand All @@ -22,6 +23,7 @@ describe('variadic tuples ([a, ...b[]])', () => {
.with([...P.array(), P.any], () => 'non empty')
.otherwise(() => 'empty');

expect(f([])).toBe('empty');
expect(f([1])).toBe('non empty');
expect(f([1, 2])).toBe('non empty');
expect(f([1, 2, 3])).toBe('non empty');
Expand Down

0 comments on commit c07c4fd

Please sign in to comment.