(title, isRes)
| 30 | export const DISPLAY_WIDTH = 50 |
| 31 | |
| 32 | export function printHeader (title, isRes) { // test start, test res |
| 33 | const sep = `\n${'='.repeat(DISPLAY_WIDTH)}\n` |
| 34 | console.log( |
| 35 | (isRes ? LogColors.MAGENTA : LogColors.CYAN) |
| 36 | + sep + title.padStart(Math.floor((DISPLAY_WIDTH + title.length) / 2)).padEnd(DISPLAY_WIDTH) + sep |
| 37 | + LogColors.RESET, |
| 38 | ) |
| 39 | } |
| 40 | |
| 41 | export function getResultIcon (success, infoStr = null) { |
| 42 | let resColor, resIcon |