lib/checker.js
function check(result, test) {

  const CHECKERS = [ _checkExitCode, _checkOutput, _checkStdout, _checkStderr ];
  var errors = [];

  CHECKERS.forEach(function (checker) {
    var error = checker(result, test);
    if (error) {
      errors.push(error);
    }
  });
  
  return errors;
}
function check(result, test) {

  const CHECKERS = [ _checkExitCode, _checkOutput, _checkStdout, _checkStderr ];
  var errors = [];

  CHECKERS.forEach(function (checker) {
    var error = checker(result, test);
    if (error) {
      errors.push(error);
    }
  });
  
  return errors;
}
function check ( result , test ) { const CHECKERS = [ _checkExitCode , _checkOutput , _checkStdout , _checkStderr ] ; var errors = [ ] ; CHECKERS . forEach ( function ( checker ) { var error = checker ( result , test ) ; if ( error ) { errors . push ( error ) ; } } ) ; return errors ; }
Check command execution result with test expectation against a set of check functions.

@param {Object} result: command execution result
@param {Object} test: test expectation
@return {Array} check errors
Check command execution result with test expectation against a set of check functions .