(type: 'fail' | 'pass' | 'details', text: string)
| 28 | } |
| 29 | |
| 30 | const detect = (type: 'fail' | 'pass' | 'details', text: string) => { |
| 31 | const match = r[type].exec(text) |
| 32 | if (!match) { |
| 33 | return null |
| 34 | } |
| 35 | return match.groups |
| 36 | } |
| 37 | |
| 38 | // see comment below for extracting logic into custom consumer later |
| 39 | const formatMessage = (message: string): string => { |