mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 06:17:10 +01:00
Add list-suites and list-tests options to limit report size
This commit is contained in:
parent
0919385c06
commit
3744805866
20 changed files with 28593 additions and 18534 deletions
|
|
@ -14,16 +14,11 @@ export function getCheckRunSha(): string {
|
|||
}
|
||||
|
||||
export function enforceCheckRunLimits(result: TestResult, maxAnnotations: number): void {
|
||||
const output = result.output
|
||||
if (!output) {
|
||||
return
|
||||
}
|
||||
|
||||
// Limit number of created annotations
|
||||
output.annotations?.splice(maxAnnotations + 1)
|
||||
result.annotations.splice(maxAnnotations + 1)
|
||||
|
||||
// Limit number of characters in annotation fields
|
||||
for (const err of output.annotations ?? []) {
|
||||
for (const err of result.annotations) {
|
||||
err.title = ellipsis(err.title || '', 255)
|
||||
err.message = ellipsis(err.message, 65535)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue