mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-01 02:45:22 -08:00
Fix JUnit message / type fields.
This commit is contained in:
committed by
Jozef Izso
parent
482d7087e0
commit
521e122f40
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user