MCPcopy Index your code
hub / github.com/totaljs/framework / logger

Function logger

test.js:242–254  ·  view source on GitHub ↗
(fail, name, description)

Source from the content-addressed store, hash-verified

240};
241
242function 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}

Callers 1

test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected