class assert.AssertionError
extends Error
Indicates the failure of an assertion. All errors thrown by the node:assert module will be instances of the AssertionError class.
Constructors Jump to heading
new
Jump to headingAssertionError(options?: { message?: string | undefined; actual?: unknown | undefined; expected?: unknown | undefined; operator?: string | undefined; stackStartFn?: Function | undefined; })Properties Jump to heading
Jump to headingactual: unknownSet to the actual argument for methods such as assert.strictEqual().
Jump to headingcode: "ERR_ASSERTION"Value is always ERR_ASSERTION to show that the error is an assertion error.
Jump to headingexpected: unknownSet to the expected argument for methods such as assert.strictEqual().
Jump to headinggeneratedMessage: booleanIndicates if the message was auto-generated (true) or not.
Jump to headingoperator: stringSet to the passed in operator value.