Skip to content

Commit c07c4fd

Browse files
committed
variadic tuples: add tests
1 parent 4c02ce7 commit c07c4fd

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/variadic-tuples.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ describe('variadic tuples ([a, ...b[]])', () => {
1010
.with([P.any, ...P.array()], () => 'non empty')
1111
.otherwise(() => 'empty');
1212

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

26+
expect(f([])).toBe('empty');
2527
expect(f([1])).toBe('non empty');
2628
expect(f([1, 2])).toBe('non empty');
2729
expect(f([1, 2, 3])).toBe('non empty');

0 commit comments

Comments
 (0)