AssertionError

external class AssertionError : Throwable(source)

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

Constructors

Link copied to clipboard
constructor(options: AssertionErrorOptions = definedExternally)

Properties

Link copied to clipboard
var actual: Any?

Set to the actual argument for methods such as {@link assert.strictEqual()}.

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard

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

Link copied to clipboard

Set to the expected argument for methods such as {@link assert.strictEqual()}.

Link copied to clipboard

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

Link copied to clipboard
open val message: String?
Link copied to clipboard

Set to the passed in operator value.

Functions

Link copied to clipboard
open override fun toString(): String