From a0b4e8b5a2feaed5d5729642773350e916776c97 Mon Sep 17 00:00:00 2001 From: Ilya Hancharyk Date: Tue, 19 Dec 2023 19:22:25 +0300 Subject: [PATCH] EPMRPP-86929 || Regression. Report the last error log to the test by default --- src/reporter.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/reporter.ts b/src/reporter.ts index 2350597..3e0f517 100644 --- a/src/reporter.ts +++ b/src/reporter.ts @@ -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]) => {