tdd - move output above error

This commit is contained in:
Jonathan Martz
2025-01-12 12:21:51 +01:00
parent 6d8c66321d
commit 47a98ca890

View File

@@ -56,6 +56,8 @@ func main() {
log.Fatal("PHPUnit output is empty. Please check your configuration.")
}
fmt.Println(output.String())
// Parse the JSON output
var result map[string]interface{}
if err := json.Unmarshal(output.Bytes(), &result); err != nil {
@@ -68,8 +70,6 @@ func main() {
log.Fatal("Counts field not found in PHPUnit output.")
}
fmt.Println(output.String())
// Serialize the counts field to JSON for the email body
countsJSON, err := json.MarshalIndent(counts, "", " ")
if err != nil {