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

Function formatTestDiscovery

src/utils/test-preflight.ts:512–539  ·  view source on GitHub ↗
(
  preflight: TestPreflightResult,
  options: { maxListedTests?: number } = {},
)

Source from the content-addressed store, hash-verified

510}
511
512export function formatTestDiscovery(
513 preflight: TestPreflightResult,
514 options: { maxListedTests?: number } = {},
515): string {
516 const maxListedTests = options.maxListedTests ?? 5;
517 const discoveredTests = collectResolvedTestSelectors(preflight);
518
519 const listedTests = discoveredTests.slice(0, maxListedTests);
520 const remainingCount = Math.max(discoveredTests.length - listedTests.length, 0);
521 const lines = [
522 `Resolved to ${preflight.totalTests} test(s):`,
523 ...listedTests.map((test) => ` - ${test}`),
524 ];
525
526 if (remainingCount > 0) {
527 lines.push(` ... and ${remainingCount} more`);
528 }
529
530 if (preflight.completeness !== 'complete') {
531 lines.push(`Discovery completeness: ${preflight.completeness}`);
532 }
533
534 for (const warning of preflight.warnings) {
535 lines.push(`Warning: ${warning}`);
536 }
537
538 return lines.join('\n');
539}
540
541/**
542 * @deprecated Use formatToolPreflight + formatTestDiscovery instead.

Callers 1

formatTestPreflightFunction · 0.85

Calls 2

pushMethod · 0.80

Tested by

no test coverage detected