function run(part, suiteIndex, testIndex) {
    var local;
    var o;
    var isSuite = true;

    if (typeof testIndex === 'number') {
      isSuite = false;
      o = suites[suiteIndex].tests[testIndex];
    } else {
      o = suites[suiteIndex];
    }

    if ( part === 'setup' ) {
      if ( isSuite ) {
        display.suiteBorder();
        display.details('suite', o);
        // display.setup('suite');
      } else {
        // display.linebreak();
        //display.details('test', o);
        // display.setup('test');
      }
      local = o.setup;
    } else if ( part === 'beforeEach' ) {
      //display.beforeEach();
      local = o.beforeEach;
    } else if ( part === 'afterEach' ) {
      //display.afterEach();
      local = o.afterEach;
    } else if ( part === 'takedown' ) {
      // if ( isSuite ) {
      //   display.takedown('suite');
      // } else {
      //   display.takedown('test');
      // }
      local = o.takedown;
    } else {
      // must be a test
      local = o.actual;
    }

    executeTest(part, local, suiteIndex, testIndex);
  }
function run(part, suiteIndex, testIndex) {
    var local;
    var o;
    var isSuite = true;

    if (typeof testIndex === 'number') {
      isSuite = false;
      o = suites[suiteIndex].tests[testIndex];
    } else {
      o = suites[suiteIndex];
    }

    if ( part === 'setup' ) {
      if ( isSuite ) {
        display.suiteBorder();
        display.details('suite', o);
        
      } else {
        
        
        
      }
      local = o.setup;
    } else if ( part === 'beforeEach' ) {
      
      local = o.beforeEach;
    } else if ( part === 'afterEach' ) {
      
      local = o.afterEach;
    } else if ( part === 'takedown' ) {
      
      
      
      
      
      local = o.takedown;
    } else {
      
      local = o.actual;
    }

    executeTest(part, local, suiteIndex, testIndex);
  }
function run ( part , suiteIndex , testIndex ) { var local ; var o ; var isSuite = true ; if ( typeof testIndex === 'number' ) { isSuite = false ; o = suites [ suiteIndex ] . tests [ testIndex ] ; } else { o = suites [ suiteIndex ] ; } if ( part === 'setup' ) { if ( isSuite ) { display . suiteBorder ( ) ; display . details ( 'suite' , o ) ; // display.setup('suite'); } else { // display.linebreak(); //display.details('test', o); // display.setup('test'); } local = o . setup ; } else if ( part === 'beforeEach' ) { //display.beforeEach(); local = o . beforeEach ; } else if ( part === 'afterEach' ) { //display.afterEach(); local = o . afterEach ; } else if ( part === 'takedown' ) { // if ( isSuite ) { //   display.takedown('suite'); // } else { //   display.takedown('test'); // } local = o . takedown ; } else { // must be a test local = o . actual ; } executeTest ( part , local , suiteIndex , testIndex ) ; }
generically handles each aspect of a suite/test setup/run/takedown
using the commonalities in each of the objects methods, and the
chaining references (o.next).

@param  {string}  part        - the portion of test to be run.
(setup, beforeEach, etc.) if undefined
assumes 'actual' test
@param  {number}  suiteIndex - the index number of the test to run
@param  {number}  testIndex   - the index number of the test to run [optional]
generically handles each aspect of a suite / test setup / run / takedown using the commonalities in each of the objects methods and the chaining references ( o . next ) .