MCPcopy Create free account
hub / github.com/getsentry/XcodeBuildMCP / formatTestCaseResults

Function formatTestCaseResults

src/utils/renderers/event-formatting.ts:627–647  ·  view source on GitHub ↗
(items: readonly TestCaseResultRenderItem[])

Source from the content-addressed store, hash-verified

625}
626
627export function formatTestCaseResults(items: readonly TestCaseResultRenderItem[]): string {
628 if (items.length === 0) {
629 return '';
630 }
631
632 const statusIcon: Record<TestCaseResultRenderItem['status'], string> = {
633 passed: '\u{2705}',
634 failed: '\u{274C}',
635 skipped: '\u{23ED}\u{FE0F}',
636 };
637
638 const lines: string[] = ['Test Results:'];
639 for (const item of items) {
640 const icon = statusIcon[item.status];
641 const duration =
642 item.durationMs !== undefined ? ` (${(item.durationMs / 1000).toFixed(3)}s)` : '';
643 const name = item.suite ? `${item.suite}/${item.test}` : item.test;
644 lines.push(` ${icon} ${name}${duration}`);
645 }
646 return lines.join('\n');
647}
648
649export function formatGroupedTestFailures(
650 events: TestFailureRenderItem[],

Callers 2

processItemFunction · 0.90

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected