MCPcopy Create free account
hub / github.com/AI45Lab/Code / check

Function check

sdk/node/examples/basic/test_api_alignment.ts:49–56  ·  view source on GitHub ↗
(name: string, condition: boolean, detail = '')

Source from the content-addressed store, hash-verified

47const results: Array<{ name: string; status: Status; detail: string }> = [];
48
49function check(name: string, condition: boolean, detail = '') {
50 const status: Status = condition ? 'PASS' : 'FAIL';
51 results.push({ name, status, detail });
52 const icon = condition ? '✓' : '✗';
53 const msg = detail ? ` ${icon} ${name}: ${detail}` : ` ${icon} ${name}`;
54 console.log(msg);
55 return condition;
56}
57
58function skip(name: string, reason: string) {
59 results.push({ name, status: 'SKIP', detail: reason });

Callers 2

runLiveTestsFunction · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected