Skip to content
Titanium SDK
Version13.0.0

You are reading 13.0.0. See this page in 13.4.1.

assert.AssertionError

pseudoAndroidiPhoneiPadmacOS

Extends Error

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

Properties 5

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

code

String

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

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

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

operator

String

Set to the passed in operator value.

Methods 1

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

Parameters
ParametersTypeDescription
options?assert.AssertionError.options

options

5 fields
actual any

The actual property on the error instance.

expected any

The expected property on the error instance.

message? String

If provided, the error message is set to this value.

operator String

The operator property on the error instance.

stackStartFn? Function

If provided, the generated stack trace omits frames before this function.