TestError
有关测试执行期间引发的错误的信息。
🌐 Information about an error thrown during test execution.
属性
🌐 Properties
cause
Added in: v1.49错误原因。当存在错误的cause时设置。如果没有原因或原因不是Error的实例,则为undefined。
🌐 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
类型
location
Added in: v1.30源代码中的错误位置。
🌐 Error location in the source code.
用法
testError.location
类型
message
Added in: v1.10错误信息。当抛出 Error(或其子类)时设置。
🌐 Error message. Set when Error (or its subclass) has been thrown.
用法
testError.message
类型
snippet
Added in: v1.33带有高亮的错误的源代码片段。
🌐 Source code snippet with highlighted error.
用法
testError.snippet
类型
stack
Added in: v1.10错误堆栈。当抛出 Error(或其子类)时设置。
🌐 Error stack. Set when Error (or its subclass) has been thrown.
用法
testError.stack
类型
value
Added in: v1.10被抛出的值。当抛出的不是 Error(或其子类)时设置。
🌐 The value that was thrown. Set when anything except the Error (or its subclass) has been thrown.
用法
testError.value
类型