MCPcopy Create free account
hub / github.com/LambdaNote/support-ts-tapl / generateTestUtils

Function generateTestUtils

article/utils.ts:603–612  ·  view source on GitHub ↗
(typecheck: (code: any) => Type)

Source from the content-addressed store, hash-verified

601
602// deno-lint-ignore no-explicit-any
603export 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}

Callers 2

arith_test.tsFile · 0.90
basic_test.tsFile · 0.90

Calls 2

typeShowFunction · 0.70
typecheckFunction · 0.70

Tested by

no test coverage detected