function formatOutput(output) {
    var indent = '  ';
    var pad = '  ';
    var results = [];
    results.push('AppDir:' + output.appDir);
    output.suites.forEach(function(suite) {
      results.push(pad + 'Suite: ' + suite.description + ' -- ' + suite.status);
      pad+=indent;
      suite.specs.forEach(function(spec) {
        results.push(pad + spec.status + ' - ' + spec.description);
        if (spec.failedExpectations) {
          pad+=indent;
          spec.failedExpectations.forEach(function (fe) {
            results.push(pad + 'message: ' + fe.message);
          });
          pad=pad.substr(2);
        }
      });
      pad = pad.substr(2);
      results.push('');
    });
    results.push('');
    return results.join('\n');
  }
function formatOutput(output) {
    var indent = '  ';
    var pad = '  ';
    var results = [];
    results.push('AppDir:' + output.appDir);
    output.suites.forEach(function(suite) {
      results.push(pad + 'Suite: ' + suite.description + ' -- ' + suite.status);
      pad+=indent;
      suite.specs.forEach(function(spec) {
        results.push(pad + spec.status + ' - ' + spec.description);
        if (spec.failedExpectations) {
          pad+=indent;
          spec.failedExpectations.forEach(function (fe) {
            results.push(pad + 'message: ' + fe.message);
          });
          pad=pad.substr(2);
        }
      });
      pad = pad.substr(2);
      results.push('');
    });
    results.push('');
    return results.join('\n');
  }
function formatOutput ( output ) { var indent = '  ' ; var pad = '  ' ; var results = [ ] ; results . push ( 'AppDir:' + output . appDir ) ; output . suites . forEach ( function ( suite ) { results . push ( pad + 'Suite: ' + suite . description + ' -- ' + suite . status ) ; pad += indent ; suite . specs . forEach ( function ( spec ) { results . push ( pad + spec . status + ' - ' + spec . description ) ; if ( spec . failedExpectations ) { pad += indent ; spec . failedExpectations . forEach ( function ( fe ) { results . push ( pad + 'message: ' + fe . message ) ; } ) ; pad = pad . substr ( 2 ) ; } } ) ; pad = pad . substr ( 2 ) ; results . push ( '' ) ; } ) ; results . push ( '' ) ; return results . join ( '\n' ) ; }
for output file output
for output file output
Format the output of a test suite