mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 13:57:09 +01:00
Fix JUnit message / type fields.
This commit is contained in:
parent
482d7087e0
commit
521e122f40
5 changed files with 18 additions and 6 deletions
|
|
@ -137,11 +137,20 @@ export class JavaJunitParser implements TestParser {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
let message
|
||||
if(typeof failure === 'object') {
|
||||
message = failure.$.message
|
||||
if(failure.$?.type) {
|
||||
message = failure.$.type + ": "+ message
|
||||
}
|
||||
}
|
||||
return {
|
||||
path: filePath,
|
||||
line,
|
||||
details,
|
||||
message: typeof failure === 'object' ? failure.message : undefined
|
||||
message
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ export interface TestCase {
|
|||
|
||||
export interface Failure {
|
||||
_: string
|
||||
type: string
|
||||
message: string
|
||||
$: {
|
||||
type?: string
|
||||
message: string
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue