Skip to content

Commit

Permalink
qase-playwright: release 2.0.0-beta.10
Browse files Browse the repository at this point in the history
Fixed the issue
`Error in reporter TypeError: Cannot read properties of undefined (reading 'toString')`
  • Loading branch information
gibiw authored and NickVolynkin committed Apr 16, 2024
1 parent bee346c commit 1824d00
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
7 changes: 7 additions & 0 deletions qase-playwright/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [email protected]

## What's new

- Reporting no longer fails when a test has failed but no stacktrace was collected.
("TypeError: Cannot read properties of undefined (reading 'toString')").

# [email protected]

## What's new
Expand Down
10 changes: 4 additions & 6 deletions qase-playwright/src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,14 @@ export class PlaywrightQaseReporter implements Reporter {
start_time: result.startTime.valueOf() / 1000,
end_time: null,
duration: result.duration,
stacktrace: error
? error.stack ? error.stack : null
: null,
stacktrace: error === null ?
null : error.stack === undefined ?
null : error.stack,
thread: result.parallelIndex.toString(),
},
fields: testCaseMetadata.fields,
id: uuidv4(),
message: error
? error.message ? error.message : null
: null,
message: error === null ? null : error.message,
muted: false,
params: testCaseMetadata.parameters,
relations: {
Expand Down

0 comments on commit 1824d00

Please sign in to comment.