mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-04-05 05:00:15 -05:00
Update new output tests
This commit is contained in:
parent
51ca01beb2
commit
02fb5c657b
@ -1593,16 +1593,17 @@ func testNewParser(input, reportFile, packageName string, t *testing.T) {
|
|||||||
|
|
||||||
actual := gtr.JUnit(gtr.FromEvents(events, packageName))
|
actual := gtr.JUnit(gtr.FromEvents(events, packageName))
|
||||||
|
|
||||||
actual, err := toXML(gtr.JUnit(report))
|
expectedXML, err := loadTestReport(reportFile, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
expected, err := loadTestReport(reportFile, "")
|
var expected junit.Testsuites
|
||||||
if err != nil {
|
if err := xml.Unmarshal([]byte(expectedXML), &expected); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expected.XMLName.Local = ""
|
||||||
if diff := cmp.Diff(actual, expected); diff != "" {
|
if diff := cmp.Diff(actual, expected); diff != "" {
|
||||||
t.Errorf("Unexpected report diff (-got, +want):\n%v", diff)
|
t.Errorf("Unexpected report diff (-got, +want):\n%v", diff)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user