lib/reporters/json.js
function clean(test) {
  var err = test.err || {};
  if (err instanceof Error) {
    err = errorJSON(err);
  }

  return {
    title: test.title,
    fullTitle: test.fullTitle(),
    duration: test.duration,
    currentRetry: test.currentRetry(),
    err: cleanCycles(err)
  };
}
function clean(test) {
  var err = test.err || {};
  if (err instanceof Error) {
    err = errorJSON(err);
  }

  return {
    title: test.title,
    fullTitle: test.fullTitle(),
    duration: test.duration,
    currentRetry: test.currentRetry(),
    err: cleanCycles(err)
  };
}
function clean ( test ) { var err = test . err || { } ; if ( err instanceof Error ) { err = errorJSON ( err ) ; } return { title : test . title , fullTitle : test . fullTitle ( ) , duration : test . duration , currentRetry : test . currentRetry ( ) , err : cleanCycles ( err ) } ; }
Return a plain-object representation of `test`
free of cyclic properties etc.

@private
@param {Object} test
@return {Object}
Return a plain - object representation of test free of cyclic properties etc .