(name: string, condition: boolean, detail = '')
| 47 | const results: Array<{ name: string; status: Status; detail: string }> = []; |
| 48 | |
| 49 | function check(name: string, condition: boolean, detail = '') { |
| 50 | const status: Status = condition ? 'PASS' : 'FAIL'; |
| 51 | results.push({ name, status, detail }); |
| 52 | const icon = condition ? '✓' : '✗'; |
| 53 | const msg = detail ? ` ${icon} ${name}: ${detail}` : ` ${icon} ${name}`; |
| 54 | console.log(msg); |
| 55 | return condition; |
| 56 | } |
| 57 | |
| 58 | function skip(name: string, reason: string) { |
| 59 | results.push({ name, status: 'SKIP', detail: reason }); |
no test coverage detected