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 Apr 7, 2023
1 parent 741936e commit 1c9abf7
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 1c9abf7

Please sign in to comment.