Optional
options: {Optional
actual?: unknownThe actual
property on the error instance.
Optional
expected?: unknownThe expected
property on the error instance.
Optional
message?: stringIf provided, the error message is set to this value.
Optional
operator?: stringThe operator
property on the error instance.
Optional
stackStartFn?: FunctionIf provided, the generated stack trace omits frames before this function.
Set to the actual
argument for methods such as ().
Optional
causeValue is always ERR_ASSERTION
to show that the error is an assertion error.
Set to the expected
argument for methods such as ().
Indicates if the message was auto-generated (true
) or not.
Set to the passed in operator value.
Optional
stackStatic
Optional
prepareOptional override for formatting stack traces
Static
stack
Indicates the failure of an assertion. All errors thrown by the
node:assert
module will be instances of theAssertionError
class.