(t *testing.T)
| 430 | } |
| 431 | |
| 432 | func TestRunSnapshot_DerivedFlag(t *testing.T) { |
| 433 | tmpDir := createSnapshotTestFiles(t) |
| 434 | resetSnapshotFlags() |
| 435 | snapshotDerived = true |
| 436 | |
| 437 | output, err := captureSnapshotOutput(t, []string{tmpDir}) |
| 438 | if err != nil { |
| 439 | t.Fatalf("runSnapshot failed: %v", err) |
| 440 | } |
| 441 | |
| 442 | var result SnapshotOutput |
| 443 | if err := json.Unmarshal([]byte(output), &result); err != nil { |
| 444 | t.Fatalf("failed to parse JSON: %v", err) |
| 445 | } |
| 446 | |
| 447 | // At least one task should have derived fields |
| 448 | foundDerived := false |
| 449 | for _, snap := range result.Tasks { |
| 450 | if snap.IsBlocked != nil || snap.DependencyDepth != nil { |
| 451 | foundDerived = true |
| 452 | break |
| 453 | } |
| 454 | } |
| 455 | if !foundDerived { |
| 456 | t.Error("derived flag set but no derived fields found in output") |
| 457 | } |
| 458 | } |
| 459 | |
| 460 | func TestRunSnapshot_GroupBy(t *testing.T) { |
| 461 | tmpDir := createSnapshotTestFiles(t) |
nothing calls this directly
no test coverage detected