lib/reporters/diff.js
function errMessageFormat (showDiff, pos, title, msg, stack) {
  if (showDiff) {
    return format.red('  ' + pos + ') ' + title + ':\n' + msg) + format.gray('\n' + stack + '\n')
  }
  return format.red('  ' + pos + ') ' + title + ':\n') +
    format.white('     ' + msg) +
    format.white('\n' + stack + '\n')
}
function errMessageFormat (showDiff, pos, title, msg, stack) {
  if (showDiff) {
    return format.red('  ' + pos + ') ' + title + ':\n' + msg) + format.gray('\n' + stack + '\n')
  }
  return format.red('  ' + pos + ') ' + title + ':\n') +
    format.white('     ' + msg) +
    format.white('\n' + stack + '\n')
}
function errMessageFormat ( showDiff , pos , title , msg , stack ) { if ( showDiff ) { return format . red ( '  ' + pos + ') ' + title + ':\n' + msg ) + format . gray ( '\n' + stack + '\n' ) } return format . red ( '  ' + pos + ') ' + title + ':\n' ) + format . white ( '     ' + msg ) + format . white ( '\n' + stack + '\n' ) }
Return formated error message
@private
@param{boolean} is diff message
@param{number} index of message in Error queue
@param{string} test suite title
@param{string} error message
@param{string} error stack
Return formated error message