(line: string)
| 88 | } |
| 89 | |
| 90 | export function parseTestCaseLine(line: string): ParsedTestCase | null { |
| 91 | const match = line.match( |
| 92 | /^Test [Cc]ase '(.+)' (passed|failed|skipped)(?: on '.+')? \(([^)]+)\)/u, |
| 93 | ); |
| 94 | if (!match) { |
| 95 | return null; |
| 96 | } |
| 97 | const [, rawName, status, durationText] = match; |
| 98 | const { suiteName, testName } = parseRawTestName(rawName); |
| 99 | return { |
| 100 | status: status as 'passed' | 'failed' | 'skipped', |
| 101 | rawName, |
| 102 | suiteName, |
| 103 | testName, |
| 104 | durationText, |
| 105 | }; |
| 106 | } |
| 107 | |
| 108 | export function parseTotalsLine(line: string): ParsedTotals | null { |
| 109 | const match = line.match( |
no test coverage detected