MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / test

Function test

tests/schema-validation.test.cjs:52–67  ·  view source on GitHub ↗
(description, testFn)

Source from the content-addressed store, hash-verified

50}
51
52async function test(description, testFn) {
53 totalTests++;
54 try {
55 const result = await testFn();
56 if (result === true || result === undefined) {
57 log(`✅ ${description}`, 'success');
58 passedTests++;
59 } else {
60 log(`❌ ${description}: ${result}`, 'error');
61 failedTests++;
62 }
63 } catch (error) {
64 log(`❌ ${description}: ${error.message}`, 'error');
65 failedTests++;
66 }
67}
68
69function loadSchema(schemaPath) {
70 try {

Callers 1

runTestsFunction · 0.70

Calls 1

logFunction · 0.70

Tested by

no test coverage detected