review feedback
This commit is contained in:
parent
f7bbc5259c
commit
3422d7c32f
|
|
@ -8,7 +8,7 @@ Information about an error thrown during test execution.
|
|||
* since: v1.49
|
||||
- type: ?<[TestInfoError]>
|
||||
|
||||
Error cause. Set when there is a [cause](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) for the error. Will be null if there is no cause or if the cause is not an instance of [Error] (or its subclass).
|
||||
Error cause. Set when there is a [cause](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) for the error. Will be `undefined` if there is no cause or if the cause is not an instance of [Error]
|
||||
|
||||
## property: TestInfoError.message
|
||||
* since: v1.10
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Information about an error thrown during test execution.
|
|||
* since: v1.49
|
||||
- type: ?<[TestError]>
|
||||
|
||||
Error cause. Set when there is a [cause](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) for the error. Will be null if there is no cause or if the cause is not an instance of [Error] (or its subclass).
|
||||
Error cause. Set when there is a [cause](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) for the error. Will be `undefined` if there is no cause or if the cause is not an instance of [Error]
|
||||
|
||||
## property: TestError.message
|
||||
* since: v1.10
|
||||
|
|
|
|||
|
|
@ -441,10 +441,8 @@ export function formatError(error: TestError, highlightCode: boolean): ErrorDeta
|
|||
if (parsedStack && !location)
|
||||
location = parsedStack.location;
|
||||
|
||||
if (error.cause) {
|
||||
tokens.push();
|
||||
tokens.push(indent(colors.dim('[cause]: ') + formatError(error.cause, highlightCode).message, ' '));
|
||||
}
|
||||
if (error.cause)
|
||||
tokens.push(colors.dim('[cause]: ') + formatError(error.cause, highlightCode).message);
|
||||
|
||||
return {
|
||||
location,
|
||||
|
|
|
|||
2
packages/playwright/types/test.d.ts
vendored
2
packages/playwright/types/test.d.ts
vendored
|
|
@ -9155,7 +9155,7 @@ export interface TestInfoError {
|
|||
/**
|
||||
* Error cause. Set when there is a
|
||||
* [cause](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) for the
|
||||
* error. Will be null if there is no cause or if the cause is not an instance of [Error] (or its subclass).
|
||||
* error. Will be `undefined` if there is no cause or if the cause is not an instance of [Error]
|
||||
*/
|
||||
cause?: TestInfoError;
|
||||
|
||||
|
|
|
|||
2
packages/playwright/types/testReporter.d.ts
vendored
2
packages/playwright/types/testReporter.d.ts
vendored
|
|
@ -557,7 +557,7 @@ export interface TestError {
|
|||
/**
|
||||
* Error cause. Set when there is a
|
||||
* [cause](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) for the
|
||||
* error. Will be null if there is no cause or if the cause is not an instance of [Error] (or its subclass).
|
||||
* error. Will be `undefined` if there is no cause or if the cause is not an instance of [Error]
|
||||
*/
|
||||
cause?: TestError;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue