MCPcopy Create free account
hub / github.com/SethGammon/Citadel / check

Function check

scripts/test-demo.js:115–127  ·  view source on GitHub ↗
(cmd, expectedColor, expectedTool, label, source)

Source from the content-addressed store, hash-verified

113 errors.push(`tier=${result.tier}, expected ${expectation.tier}`);
114 }
115 if (expectation.tool && result.tool !== expectation.tool) {
116 errors.push(`tool=${result.tool}, expected ${expectation.tool}`);
117 }
118 if (expectation.forbiddenTool && result.tool === expectation.forbiddenTool) {
119 errors.push(`forbidden tool=${result.tool}`);
120 }
121 if (expectation.candidates === true && (!Array.isArray(result.candidates) || result.candidates.length === 0)) {
122 errors.push('expected candidate evidence');
123 }
124 if (expectation.candidate && (!Array.isArray(result.candidates) || !result.candidates.includes(expectation.candidate))) {
125 errors.push(`missing candidate ${expectation.candidate}`);
126 }
127 if (result.final === false) {
128 if (result.command !== null) errors.push(`non-final command must be null, got ${result.command}`);
129 if (result.canRunNow !== false) errors.push(`non-final canRunNow must be false, got ${result.canRunNow}`);
130 if (result.boundary !== 'semantic-classification-required') errors.push(`non-final boundary=${result.boundary}`);

Callers 2

test-demo.jsFile · 0.70
finishFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected