ow
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Predicate<Error>
    • ErrorPredicate

Index

Constructors

constructor

Accessors

evalError

evalError:

Test an Error to be an EvalError.

not

not:

Invert the following validators.

rangeError

rangeError:

Test an Error to be a RangeError.

referenceError

referenceError:

Test an Error to be a ReferenceError.

syntaxError

syntaxError:

Test an Error to be a SyntaxError.

typeError

typeError:

Test an Error to be a TypeError.

uriError

uriError:

Test an Error to be a URIError.

Methods

hasKeys

  • hasKeys(...keys: string[]): this
  • Test the error object to have specific keys.

    Parameters

    • Rest ...keys: string[]

      One or more keys which should be part of the error object.

    Returns this

instanceOf

  • instanceOf(instance: any): this
  • Test an error to be of a specific instance type.

    Parameters

    • instance: any

      The expected instance type of the error.

    Returns this

message

  • message(expected: string): this
  • Test an error to have a specific message.

    Parameters

    • expected: string

      Expected message of the Error.

    Returns this

messageIncludes

  • messageIncludes(message: string): this
  • Test the error message to include a specific message.

    Parameters

    • message: string

      Message that should be included in the error.

    Returns this

name

  • name(expected: string): this
  • Test an error to have a specific name.

    Parameters

    • expected: string

      Expected name of the Error.

    Returns this