Skip to main content

TestError

Information about an error thrown during test execution.


屬性 (Properties)

cause

Added in: v1.49 testError.cause

Error cause. Set when there is a cause for the error. Will be undefined if there is no cause or if the cause is not an instance of Error.

使用方式

testError.cause

型別 (Type)


location

Added in: v1.30 testError.location

Error location in the source code.

使用方式

testError.location

型別 (Type)


message

Added in: v1.10 testError.message

Error message. Set when Error (or its subclass) has been thrown.

使用方式

testError.message

型別 (Type)


snippet

Added in: v1.33 testError.snippet

Source code snippet with highlighted error.

使用方式

testError.snippet

型別 (Type)


stack

Added in: v1.10 testError.stack

Error stack. Set when Error (or its subclass) has been thrown.

使用方式

testError.stack

型別 (Type)


value

Added in: v1.10 testError.value

The value that was thrown. Set when anything except the Error (or its subclass) has been thrown.

使用方式

testError.value

型別 (Type)