(line: string)
| 116 | } |
| 117 | |
| 118 | export function parseFailureDiagnostic(line: string): ParsedFailureDiagnostic | null { |
| 119 | const match = line.match(/^(.*?):(\d+): error: -\[(.+?)\s+(.+?)\] : (.+)$/u); |
| 120 | if (!match) { |
| 121 | return null; |
| 122 | } |
| 123 | const [, filePath, lineNumber, suiteName, testName, message] = match; |
| 124 | return { |
| 125 | rawTestName: `-[${suiteName} ${testName}]`, |
| 126 | suiteName: normalizeSuiteName(suiteName), |
| 127 | testName, |
| 128 | location: lineNumber === '0' ? undefined : `${filePath}:${lineNumber}`, |
| 129 | message: message.replace(/^failed\s*-\s*/u, ''), |
| 130 | }; |
| 131 | } |
| 132 | |
| 133 | export function parseDurationMs(durationText?: string): number | undefined { |
| 134 | if (!durationText) { |
no test coverage detected