playwright/docs/src/test-reporter-api/class-testerror.md

65 lines
1.2 KiB
Markdown
Raw Normal View History

# class: TestError
2022-07-06 02:24:50 +02:00
* since: v1.10
* langs: js
Information about an error thrown during test execution.
2024-10-17 01:42:59 +02:00
## property: TestError.actual
* since: v1.49
- type: ?<[any]>
Actual value.
## property: TestError.expected
* since: v1.49
- type: ?<[any]>
Expected value.
## property: TestError.log
* since: v1.49
- type: ?<[Array]<[string]>>
Call log.
## property: TestError.message
* since: v1.10
- type: ?<[string]>
Error message. Set when [Error] (or its subclass) has been thrown.
## property: TestError.message
2022-07-06 02:24:50 +02:00
* since: v1.10
- type: ?<[string]>
Error message. Set when [Error] (or its subclass) has been thrown.
2024-10-17 01:42:59 +02:00
## property: TestError.shortMessage
* since: v1.49
- type: ?<[string]>
Failure message.
## property: TestError.stack
2022-07-06 02:24:50 +02:00
* since: v1.10
- type: ?<[string]>
Error stack. Set when [Error] (or its subclass) has been thrown.
## property: TestError.value
2022-07-06 02:24:50 +02:00
* since: v1.10
- type: ?<[string]>
The value that was thrown. Set when anything except the [Error] (or its subclass) has been thrown.
## property: TestError.location
* since: v1.30
- type: ?<[Location]>
Error location in the source code.
## property: TestError.snippet
* since: v1.33
- type: ?<[string]>
Source code snippet with highlighted error.