Skip to content

Commit

Permalink
EPMRPP-89718 || Display stack trace for failed test cases in ReportPo…
Browse files Browse the repository at this point in the history
…rtal (#185)
  • Loading branch information
AliakseiLiasnitski authored Mar 21, 2024
1 parent a756b45 commit 2a1be0e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class Reporter {
sendLogOnFinishFailedItem(test, tempTestId) {
if (test.status === FAILED) {
const sendFailedLogPromise = this.client.sendLog(tempTestId, {
message: test.err,
message: test.err.stack,
level: logLevels.ERROR,
time: new Date().valueOf(),
}).promise;
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const getTestInfo = (test, testFileName, status, err) => ({
title: test.title,
codeRef: getCodeRef(test.titlePath(), testFileName),
parentId: test.parent.id,
err: (err && err.message) || err || (test.err && test.err.message),
err: err || test.err,
testFileName,
});

Expand Down
2 changes: 1 addition & 1 deletion test/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ describe('utils script', () => {
status: 'failed',
parentId: 'parentSuiteId',
codeRef: 'test/example.spec.js/suite name/test name',
err: 'error message',
err: { message: 'error message' },
testFileName,
};

Expand Down

0 comments on commit 2a1be0e

Please sign in to comment.