MCPcopy Create free account
hub / github.com/anus-dev/ANUS / printDebugInfo

Function printDebugInfo

integration-tests/test-helper.ts:42–68  ·  view source on GitHub ↗
(
  rig: TestRig,
  result: string,
  context: Record<string, unknown> = {},
)

Source from the content-addressed store, hash-verified

40
41// Helper to print debug information when tests fail
42export function printDebugInfo(
43 rig: TestRig,
44 result: string,
45 context: Record<string, unknown> = {},
46) {
47 console.error('Test failed - Debug info:');
48 console.error('Result length:', result.length);
49 console.error('Result (first 500 chars):', result.substring(0, 500));
50 console.error(
51 'Result (last 500 chars):',
52 result.substring(result.length - 500),
53 );
54
55 // Print any additional context provided
56 Object.entries(context).forEach(([key, value]) => {
57 console.error(`${key}:`, value);
58 });
59
60 // Check what tools were actually called
61 const allTools = rig.readToolLogs();
62 console.error(
63 'All tool calls found:',
64 allTools.map((t) => t.toolRequest.name),
65 );
66
67 return allTools;
68}
69
70// Helper to validate model output and warn about unexpected content
71export function validateModelOutput(

Calls 1

readToolLogsMethod · 0.80

Tested by

no test coverage detected