(input: string[])
| 469 | |
| 470 | it('should work with variadic tuples', () => { |
| 471 | const fn = (input: string[]) => |
| 472 | match(input) |
| 473 | .with( |
| 474 | [P.string, 'some', 'cli', 'cmd', P.select(), ...P.array()], |
| 475 | (arg) => { |
| 476 | type t = Expect<Equal<typeof arg, string>>; |
| 477 | return arg; |
| 478 | } |
| 479 | ) |
| 480 | .otherwise(() => '2'); |
| 481 | |
| 482 | expect(fn(['some cli cmd param', 'some', 'cli', 'cmd', 'param'])).toEqual( |
| 483 | 'param' |
no test coverage detected