mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
Account for existing content in step summary
This commit is contained in:
parent
aa953f36f9
commit
f86f37a955
1 changed files with 6 additions and 1 deletions
|
|
@ -56,7 +56,12 @@ export function getReport(results: TestRunResult[], options: ReportOptions = DEF
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMaxReportLength(options: ReportOptions = DEFAULT_OPTIONS): number {
|
function getMaxReportLength(options: ReportOptions = DEFAULT_OPTIONS): number {
|
||||||
return options.useActionsSummary ? MAX_ACTIONS_SUMMARY_LENGTH : MAX_REPORT_LENGTH
|
if (options.useActionsSummary) {
|
||||||
|
const currentSummaryContent = core.summary.stringify()
|
||||||
|
const currentSummarySize = getByteLength(currentSummaryContent)
|
||||||
|
return MAX_ACTIONS_SUMMARY_LENGTH - currentSummarySize
|
||||||
|
}
|
||||||
|
return MAX_REPORT_LENGTH
|
||||||
}
|
}
|
||||||
|
|
||||||
function trimReport(lines: string[], options: ReportOptions): string {
|
function trimReport(lines: string[], options: ReportOptions): string {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue