(
step: string,
args: string[],
result: CliJsonResult,
assertionDetail?: string,
)
| 145 | } |
| 146 | |
| 147 | function buildFailureDebug( |
| 148 | step: string, |
| 149 | args: string[], |
| 150 | result: CliJsonResult, |
| 151 | assertionDetail?: string, |
| 152 | ): string { |
| 153 | const lines: string[] = [formatResultDebug(step, args, result)]; |
| 154 | if (assertionDetail) { |
| 155 | lines.push('assertion:', assertionDetail); |
| 156 | } |
| 157 | lines.push('last snapshot context:', formatLastSnapshotContext(args)); |
| 158 | lines.push('recent step history:', formatStepHistory()); |
| 159 | lines.push('artifacts:', ensureArtifactDir()); |
| 160 | return lines.join('\n'); |
| 161 | } |
| 162 | |
| 163 | function formatLastSnapshotContext(args: string[]): string { |
| 164 | if (!lastSnapshot) { |
no test coverage detected