# assert.AssertionError

Indicates the failure of an assertion. All errors thrown by the assert module will be instances of the AssertionError class.

Availability
0.8
0.8
9.2.0
Extends
Error

NOTE

This is an abstract type. Any object of this structure can be used where this type is used.

# Properties

# actual

Availability
0.8
0.8
9.2.0
actual :any

Set to the actual argument for methods such as assert.strictEqual().


# code

Availability
0.8
0.8
9.2.0
code :String

Value is always ERR_ASSERTION to show that the error is an assertion error.


# expected

Availability
0.8
0.8
9.2.0
expected :any

Set to the expected value for methods such as assert.strictEqual().


# generatedMessage

Availability
0.8
0.8
9.2.0
generatedMessage :Boolean

Indicates if the message was auto-generated (true) or not.


# operator

Availability
0.8
0.8
9.2.0
operator :String

Set to the passed in operator value.

# Methods

# constructor

Availability
0.8
0.8
9.2.0
constructor([options]) assert.AssertionError

A subclass of Error that indicates the failure of an assertion.

Parameters

Name Type Description
options assert.AssertionError.options

options

Returns