# 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 47

##### 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 63

##### Returns:

the error message

Type
  string

#### stackTrace() → {string}

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

##### Returns:

the stack trace

Type
  string