#

API Docs for: 3.10.3
Show: Inherited Protected Private Deprecated

# Test.AssertionError Class

Defined in: `test/js/AssertionError.js:1`
Module: test

Error is thrown whenever an assertion fails. It provides methods to more easily get at error information and also provides a base class from which more specific assertion errors can be derived.

- Index
- Methods
- Properties

## Item Index

### Methods

- getMessage
- toString

### Properties

- message
- name

## Methods

### `getMessage`

() String

Defined in `test/js/AssertionError.js:34`

Returns a fully formatted error for an assertion failure. This should be overridden by all subclasses to provide specific information.

#### Returns:

String: A string describing the error.

### `toString`

() String

Defined in `test/js/AssertionError.js:44`

Returns a string representation of the error.

#### Returns:

String: A string representation of the error.

## Properties

### `message`

String

Defined in `test/js/AssertionError.js:14`

Error message. Must be duplicated to ensure browser receives it.

### `name`

String

Defined in `test/js/AssertionError.js:21`

The name of the error that occurred.