constants

lib/errors. constants

Source:

When Mocha throws exceptions (or rejects Promises), it attempts to assign a code property to the Error object, for easier handling. These are the potential values of code.

Members

(static, constant) FATAL

Source:
Default Value:
  • ERR_MOCHA_FATAL

An unrecoverable error.

(static, constant) FORBIDDEN_EXCLUSIVITY

Source:
Default Value:
  • ERR_MOCHA_FORBIDDEN_EXCLUSIVITY

Use of only() w/ --forbid-only results in this error.

(static, constant) INSTANCE_ALREADY_DISPOSED

Source:
Default Value:
  • ERR_MOCHA_INSTANCE_ALREADY_DISPOSED

Invalid state transition occurring in Mocha instance

(static, constant) INSTANCE_ALREADY_RUNNING

Source:
Default Value:
  • ERR_MOCHA_INSTANCE_ALREADY_RUNNING

Invalid state transition occurring in Mocha instance

(static, constant) INVALID_ARG_TYPE

Source:
Default Value:
  • ERR_MOCHA_INVALID_ARG_TYPE

The type of an argument to a function call is invalid

(static, constant) INVALID_ARG_VALUE

Source:
Default Value:
  • ERR_MOCHA_INVALID_ARG_VALUE

The value of an argument to a function call is invalid

(static, constant) INVALID_EXCEPTION

Source:
Default Value:
  • ERR_MOCHA_INVALID_EXCEPTION

Something was thrown, but it wasn't an Error

(static, constant) INVALID_INTERFACE

Source:
Default Value:
  • ERR_MOCHA_INVALID_INTERFACE

An interface (e.g., Mocha.interfaces) is unknown or invalid

(static, constant) INVALID_PLUGIN_DEFINITION

Source:
Default Value:
  • ERR_MOCHA_INVALID_PLUGIN_DEFINITION

To be thrown when a builtin or third-party plugin definition (the definition of mochaHooks) is invalid

(static, constant) INVALID_PLUGIN_IMPLEMENTATION

Source:
Default Value:
  • ERR_MOCHA_INVALID_PLUGIN_IMPLEMENTATION

To be thrown when a user-defined plugin implementation (e.g., mochaHooks) is invalid

(static, constant) INVALID_REPORTER

Source:
Default Value:
  • ERR_MOCHA_INVALID_REPORTER

A reporter (.e.g, Mocha.reporters) is unknown or invalid

(static, constant) MULTIPLE_DONE

Source:
Default Value:
  • ERR_MOCHA_MULTIPLE_DONE

done() was called twice in a Test or Hook callback

(static, constant) NO_FILES_MATCH_PATTERN

Source:
Default Value:
  • ERR_MOCHA_NO_FILES_MATCH_PATTERN

No files matched the pattern provided by the user

(static, constant) TIMEOUT

Source:
Default Value:
  • ERR_MOCHA_TIMEOUT

When a runnable exceeds its allowed run time.

(static, constant) UNPARSABLE_FILE

Source:
Default Value:
  • ERR_MOCHA_UNPARSABLE_FILE

Input file is not able to be parsed

(static, constant) UNSUPPORTED

Source:
Default Value:
  • ERR_MOCHA_UNSUPPORTED

Known, but unsupported behavior of some kind