MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / formatTestDiscoveryEvent

Function formatTestDiscoveryEvent

src/utils/renderers/event-formatting.ts:597–616  ·  view source on GitHub ↗
(event: TestDiscoveryRenderItem)

Source from the content-addressed store, hash-verified

595const TEST_DISCOVERY_PREVIEW_LIMIT = 6;
596
597export function formatTestDiscoveryEvent(event: TestDiscoveryRenderItem): string {
598 const visibleTests = event.tests.slice(0, TEST_DISCOVERY_PREVIEW_LIMIT);
599 const lines = [`Discovered ${event.total} test(s):`];
600
601 for (const test of visibleTests) {
602 lines.push(` ${test}`);
603 }
604
605 const hasMore =
606 event.truncated ||
607 event.tests.length > visibleTests.length ||
608 event.total > visibleTests.length;
609
610 if (hasMore) {
611 const remainingCount = Math.max(event.total - visibleTests.length, 0);
612 lines.push(` (...and ${remainingCount} more)`);
613 }
614
615 return lines.join('\n');
616}
617
618export function formatTestProgressEvent(event: TestProgressRenderItem): string {
619 const failWord = event.failed === 1 ? 'failure' : 'failures';

Callers 1

processItemFunction · 0.90

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected