(
chain: SelectorChain,
diagnostics: SelectorDiagnostics[],
options: { unique?: boolean },
)
| 80 | } |
| 81 | |
| 82 | export function formatSelectorFailure( |
| 83 | chain: SelectorChain, |
| 84 | diagnostics: SelectorDiagnostics[], |
| 85 | options: { unique?: boolean }, |
| 86 | ): string { |
| 87 | if (diagnostics.length === 0) { |
| 88 | return `Selector did not match: ${chain.raw}`; |
| 89 | } |
| 90 | const summary = diagnostics.map((entry) => `${entry.selector} -> ${entry.matches}`).join(', '); |
| 91 | return (options.unique ?? true) |
| 92 | ? `Selector did not resolve uniquely (${summary})` |
| 93 | : `Selector did not match (${summary})`; |
| 94 | } |
| 95 | |
| 96 | function analyzeSelectorMatches( |
| 97 | nodes: SnapshotState['nodes'], |
no outgoing calls
no test coverage detected