src/Tst.js
function consoleReporter(reports, options = {}) {
  var hide = options.hide || {};
  (function _consoleReporter(reports) {
    reports.forEach(
      ({children, desc, status, counts, time, code, error}) => {
        let countStr = makeCounts(counts);
        let color    = statusInfo[status].color;
        let colorStr = `color: ${color}`;
        if (children) {
          let msg = desc;
          let collapse = hide.children || hide.passed && status === 'pass';
          if (!hide.counts) { msg = `${msg} (${countStr})`; }
          console[collapse ? 'groupCollapsed' : 'group']('%c' + msg, colorStr);
          _consoleReporter(children);
          console.groupEnd();
        } else {
          if (error) console.log('%c %s (%O)', colorStr, desc, error);
          else console.log('%c %s', colorStr, desc);
        }
      }
    );
  })(reports);
}
function consoleReporter(reports, options = {}) {
  var hide = options.hide || {};
  (function _consoleReporter(reports) {
    reports.forEach(
      ({children, desc, status, counts, time, code, error}) => {
        let countStr = makeCounts(counts);
        let color    = statusInfo[status].color;
        let colorStr = `color: ${color}`;
        if (children) {
          let msg = desc;
          let collapse = hide.children || hide.passed && status === 'pass';
          if (!hide.counts) { msg = `${msg} (${countStr})`; }
          console[collapse ? 'groupCollapsed' : 'group']('%c' + msg, colorStr);
          _consoleReporter(children);
          console.groupEnd();
        } else {
          if (error) console.log('%c %s (%O)', colorStr, desc, error);
          else console.log('%c %s', colorStr, desc);
        }
      }
    );
  })(reports);
}
function consoleReporter ( reports , options = { } ) { var hide = options . hide || { } ; ( function _consoleReporter ( reports ) { reports . forEach ( ( { children , desc , status , counts , time , code , error } ) => { let countStr = makeCounts ( counts ) ; let color = statusInfo [ status ] . color ; let colorStr = ` ${ color } ` ; if ( children ) { let msg = desc ; let collapse = hide . children || hide . passed && status === 'pass' ; if ( ! hide . counts ) { msg = ` ${ msg } ${ countStr } ` ; } console [ collapse ? 'groupCollapsed' : 'group' ] ( '%c' + msg , colorStr ) ; _consoleReporter ( children ) ; console . groupEnd ( ) ; } else { if ( error ) console . log ( '%c %s (%O)' , colorStr , desc , error ) ; else console . log ( '%c %s' , colorStr , desc ) ; } } ) ; } ) ( reports ) ; }
Console reporter, which reports results on the console.
Console reporter which reports results on the console .