outputDiagnostics = function (diagnostic) {
  const prefix = '  ';
  let output = `${prefix}---\n`;

  output += prefix + yaml.safeDump(diagnostic).split('\n').join(`\n${prefix}`);
  output += '...\n';
  return output;
}
Takes in a JavaScript object and outputs a TAP diagnostics string
@param {Object} diagnostic JavaScript object to be embedded as YAML into output.
@returns {string} diagnostics string with YAML embedded - TAP version 13 compliant