| 106 | } |
| 107 | |
| 108 | export function parseTotalsLine(line: string): ParsedTotals | null { |
| 109 | const match = line.match( |
| 110 | /^Executed (\d+) tests?, with (\d+) failures?(?: \(\d+ unexpected\))? in (.+)$/u, |
| 111 | ); |
| 112 | if (!match) { |
| 113 | return null; |
| 114 | } |
| 115 | return { executed: Number(match[1]), failed: Number(match[2]), displayDurationText: match[3] }; |
| 116 | } |
| 117 | |
| 118 | export function parseFailureDiagnostic(line: string): ParsedFailureDiagnostic | null { |
| 119 | const match = line.match(/^(.*?):(\d+): error: -\[(.+?)\s+(.+?)\] : (.+)$/u); |