function runTests(dir, next) {
  // scan unit test directory for tests to execute
  dirContent = fs.readdirSync(dir);
  try {
    console.log();
    dirContent.forEach(function(file) {
      runTest(dir, file);
    });
  } catch (e) {
    if(argv.failonerror) {
      console.log("Failing on first error");
    } else { throw e; }
  }

  if(next) { next(); }
}
/**
 * Run all tests from the unit test directory
 */
Run all tests from the unit test directory
Run all tests from the unit test directory
function runTests(dir, next) {
  dirContent = fs.readdirSync(dir);
  try {
    console.log();
    dirContent.forEach(function(file) {
      runTest(dir, file);
    });
  } catch (e) {
    if(argv.failonerror) {
      console.log("Failing on first error");
    } else { throw e; }
  }
  if(next) { next(); }
}
function runTests ( dir , next ) { dirContent = fs . readdirSync ( dir ) ; try { console . log ( ) ; dirContent . forEach ( function ( file ) { runTest ( dir , file ) ; } ) ; } catch ( e ) { if ( argv . failonerror ) { console . log ( "Failing on first error" ) ; } else { throw e ; } } if ( next ) { next ( ) ; } }
Run all tests from the unit test directory
Run all tests from the unit test directory
// scan unit test directory for tests to execute