Function
printCheck
(name, value, comment = '')
Source from the content-addressed store, hash-verified
| 192 | } |
| 193 | |
| 194 | function printCheck(name, value, comment = '') { |
| 195 | let status = '' |
| 196 | if (value == true) { |
| 197 | status += chalk.bold.green(figures.tick) |
| 198 | } else { |
| 199 | status += chalk.bold.red(figures.cross) |
| 200 | } |
| 201 | |
| 202 | if (value instanceof Error) { |
| 203 | comment = `${comment} ${chalk.red(value.message)}`.trim() |
| 204 | } |
| 205 | |
| 206 | output.print(status, name.toUpperCase(), chalk.dim(comment)) |
| 207 | } |
Tested by
no test coverage detected