lib/errors.js
function createInvalidArgumentValueError(message, argument, value, reason) {
  var err = new TypeError(message);
  err.code = 'ERR_MOCHA_INVALID_ARG_VALUE';
  err.argument = argument;
  err.value = value;
  err.reason = typeof reason !== 'undefined' ? reason : 'is invalid';
  return err;
}
function createInvalidArgumentValueError(message, argument, value, reason) {
  var err = new TypeError(message);
  err.code = 'ERR_MOCHA_INVALID_ARG_VALUE';
  err.argument = argument;
  err.value = value;
  err.reason = typeof reason !== 'undefined' ? reason : 'is invalid';
  return err;
}
function createInvalidArgumentValueError ( message , argument , value , reason ) { var err = new TypeError ( message ) ; err . code = 'ERR_MOCHA_INVALID_ARG_VALUE' ; err . argument = argument ; err . value = value ; err . reason = typeof reason !== 'undefined' ? reason : 'is invalid' ; return err ; }
Creates an error object to be thrown when an argument did not use the supported value

@public
@param {string} message - Error message to be displayed.
@param {string} argument - Argument name.
@param {string} value - Argument value.
@param {string} [reason] - Why value is invalid.
@returns {Error} instance detailing the error condition
Creates an error object to be thrown when an argument did not use the supported value