Skip to content

Commit

Permalink
EPMRPP-86929 || Regression. Report the last error log to the test by …
Browse files Browse the repository at this point in the history
…default
  • Loading branch information
AmsterGet committed Dec 19, 2023
1 parent f59c827 commit a0b4e8b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,13 +492,15 @@ export class RPReporter implements Reporter {
});
}

if (result.error && this.config.extendTestDescriptionWithLastError) {
if (result.error) {
const stacktrace = stripAnsi(result.error.stack || result.error.message);
this.sendLog(testItemId, {
level: LOG_LEVELS.ERROR,
message: stacktrace,
});
testDescription = (description || '').concat(`\n\`\`\`error\n${stacktrace}\n\`\`\``);
if (this.config.extendTestDescriptionWithLastError) {
testDescription = (description || '').concat(`\n\`\`\`error\n${stacktrace}\n\`\`\``);
}
}

[...this.nestedSteps.entries()].forEach(([key, value]) => {
Expand Down

0 comments on commit a0b4e8b

Please sign in to comment.