(t *testing.T)
| 458 | } |
| 459 | |
| 460 | func TestRunSnapshot_GroupBy(t *testing.T) { |
| 461 | tmpDir := createSnapshotTestFiles(t) |
| 462 | resetSnapshotFlags() |
| 463 | snapshotGroupBy = "status" |
| 464 | |
| 465 | output, err := captureSnapshotOutput(t, []string{tmpDir}) |
| 466 | if err != nil { |
| 467 | t.Fatalf("runSnapshot failed: %v", err) |
| 468 | } |
| 469 | |
| 470 | var result SnapshotOutput |
| 471 | if err := json.Unmarshal([]byte(output), &result); err != nil { |
| 472 | t.Fatalf("failed to parse JSON: %v", err) |
| 473 | } |
| 474 | |
| 475 | if len(result.Groups) == 0 { |
| 476 | t.Error("expected grouped output, got empty groups") |
| 477 | } |
| 478 | } |
| 479 | |
| 480 | func TestRunSnapshot_FileOutput(t *testing.T) { |
| 481 | tmpDir := createSnapshotTestFiles(t) |
nothing calls this directly
no test coverage detected