(typecheck: (code: any) => Type)
| 601 | |
| 602 | // deno-lint-ignore no-explicit-any |
| 603 | export function generateTestUtils(typecheck: (code: any) => Type) { |
| 604 | return { |
| 605 | ok: (expected: string, code: string) => { |
| 606 | assertEquals(expected, typeShow(typecheck(code))); |
| 607 | }, |
| 608 | ng: (expected: string, code: string) => { |
| 609 | assertThrows(() => typecheck(code), Error, expected); |
| 610 | }, |
| 611 | }; |
| 612 | } |
no test coverage detected