lib/errors.js
function createInvalidArgumentTypeError(message, argument, expected) {
  var err = new TypeError(message);
  err.code = 'ERR_MOCHA_INVALID_ARG_TYPE';
  err.argument = argument;
  err.expected = expected;
  err.actual = typeof argument;
  return err;
}
function createInvalidArgumentTypeError(message, argument, expected) {
  var err = new TypeError(message);
  err.code = 'ERR_MOCHA_INVALID_ARG_TYPE';
  err.argument = argument;
  err.expected = expected;
  err.actual = typeof argument;
  return err;
}
function createInvalidArgumentTypeError ( message , argument , expected ) { var err = new TypeError ( message ) ; err . code = 'ERR_MOCHA_INVALID_ARG_TYPE' ; err . argument = argument ; err . expected = expected ; err . actual = typeof argument ; return err ; }
Creates an error object to be thrown when an argument did not use the supported type

@public
@param {string} message - Error message to be displayed.
@param {string} argument - Argument name.
@param {string} expected - Expected argument datatype.
@returns {Error} instance detailing the error condition
Creates an error object to be thrown when an argument did not use the supported type