# Class: Failure

## vertx-unit-js/failure~ Failure

#### new Failure()

A failure provides the details of a failure that happened during the execution of a test case.

The failure can be:

- an assertion failure: an assertion failed
- an error failure: an expected error occured

Source:
  - vertx-unit-js/failure.js, line 36

### Methods

#### isError() → {boolean}

Source:
  - vertx-unit-js/failure.js, line 48

##### Returns:

- true if the failure is an error failure otherwise it is an assertion failure
- Type
    boolean

#### message() → {string}

Source:
  - vertx-unit-js/failure.js, line 65

##### Returns:

- the error message
- Type
    string

#### stackTrace() → {string}

Source:
  - vertx-unit-js/failure.js, line 82

##### Returns:

- the stack trace
- Type
    string