code: function encodeResult (result, count) {
      var output = '';
      output += (result.ok ? 'ok ' : 'not ok ') + count;
      output += result.message ? ' ' + result.message.toString().replace(/\s+/g, ' ') : '';
  
      if (result.skip) output += ' # SKIP';
      else if (result.todo) output += ' # TODO';
  
      output += '\n';
      if (result.ok) return output;
  
      var outer = '  ';
      var inner = outer + '  ';
      output += outer + '---\n';
      output += inner + 'operator: ' + result.operator + '\n';
  
      var ex = JSON.stringify(result.expected) || '';
      var ac = JSON.stringify(result.actual) || '';
  
      if (Math.max(ex.length, ac.length) > 65) {
          output += inner + 'expected:\n' + inner + '  ' + ex + '\n';
          output += inner + 'actual:\n' + inner + '  ' + ac + '\n';
      }
      else {
          output += inner + 'expected: ' + ex + '\n';
          output += inner + 'actual:   ' + ac + '\n';
      }
      if (result.at) {
          output += inner + 'at: ' + result.at + '\n';
      }
      if (result.operator === 'error' && result.actual && result.actual.stack) {
          var lines = String(result.actual.stack).split('\n');
          output += inner + 'stack:\n';
          output += inner + '  ' + lines[0] + '\n';
          for (var i = 1; i < lines.length; i++) {
              output += inner + lines[i] + '\n';
          }
      }
  
      output += outer + '...\n';
      return output;
  }
docs: Taken from https://github.com/substack/tape/blob/master/lib/results.js