Function
logger
(fail, name, description)
Source from the content-addressed store, hash-verified
| 240 | }; |
| 241 | |
| 242 | function logger(fail, name, description) { |
| 243 | var time = Math.floor(Date.now() - T.now) + ' ms'; |
| 244 | T.count++; |
| 245 | if (fail) { |
| 246 | T.countno++; |
| 247 | T.current.countno++; |
| 248 | console.error(T.color.red + 'Failed [x]' + T.color.reset + ' '.padRight(20, '.') + ' ' + name + (description ? (' <' + description + '>') : '') + ' [' + time + ']'); |
| 249 | } else { |
| 250 | T.countok++; |
| 251 | T.current.countok++; |
| 252 | console.info(T.color.green + 'Passed' + T.color.reset + ' '.padRight(20, '.') + ' ' + name + (description ? (' <' + description + '>') : '') + ' [' + time + ']'); |
| 253 | } |
| 254 | } |
Tested by
no test coverage detected