mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-17 14:57:09 +01:00
Fix flutter-json doesn't provide error details
This commit is contained in:
parent
2365963b2e
commit
855ff9bfaf
13 changed files with 3196 additions and 51 deletions
|
|
@ -19,8 +19,8 @@ interface TestError {
|
|||
testName: string
|
||||
path: string
|
||||
line: number
|
||||
stackTrace: string
|
||||
message: string
|
||||
details: string
|
||||
}
|
||||
|
||||
export function getAnnotations(results: TestRunResult[], maxCount: number): Annotation[] {
|
||||
|
|
@ -43,7 +43,7 @@ export function getAnnotations(results: TestRunResult[], maxCount: number): Anno
|
|||
const path = err.path ?? tr.path
|
||||
const line = err.line ?? 0
|
||||
if (mergeDup) {
|
||||
const dup = errors.find(e => path === e.path && line === e.line && err.stackTrace === e.stackTrace)
|
||||
const dup = errors.find(e => path === e.path && line === e.line && err.details === e.details)
|
||||
if (dup !== undefined) {
|
||||
dup.testRunPaths.push(tr.path)
|
||||
continue
|
||||
|
|
@ -54,8 +54,8 @@ export function getAnnotations(results: TestRunResult[], maxCount: number): Anno
|
|||
testRunPaths: [tr.path],
|
||||
suiteName: ts.name,
|
||||
testName: tc.name,
|
||||
stackTrace: err.stackTrace,
|
||||
message: err.message ?? getFirstNonEmptyLine(err.stackTrace) ?? 'Test failed',
|
||||
details: err.details,
|
||||
message: err.message ?? getFirstNonEmptyLine(err.details) ?? 'Test failed',
|
||||
path,
|
||||
line
|
||||
})
|
||||
|
|
@ -81,7 +81,7 @@ export function getAnnotations(results: TestRunResult[], maxCount: number): Anno
|
|||
end_line: e.line,
|
||||
annotation_level: 'failure',
|
||||
title: `${e.suiteName} ► ${e.testName}`,
|
||||
raw_details: fixEol(e.stackTrace),
|
||||
raw_details: fixEol(e.details),
|
||||
message
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue