(output: string)
| 18 | const shortStatDeletionsPattern = /(\d+)\s+deletions?\(-\)/ |
| 19 | |
| 20 | function parseShortStat(output: string) { |
| 21 | const insertionsMatch = output.match(shortStatInsertionsPattern) |
| 22 | const deletionsMatch = output.match(shortStatDeletionsPattern) |
| 23 | |
| 24 | return { |
| 25 | insertions: insertionsMatch ? Number.parseInt(insertionsMatch[1] ?? '0', 10) : 0, |
| 26 | deletions: deletionsMatch ? Number.parseInt(deletionsMatch[1] ?? '0', 10) : 0, |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | function countNonEmptyLines(output: string) { |
| 31 | return output |
no outgoing calls
no test coverage detected