--- Config validation tests ---
(t *testing.T)
| 773 | // --- Config validation tests --- |
| 774 | |
| 775 | func TestValidateConfig_ValidScopes(t *testing.T) { |
| 776 | v := NewValidator(false) |
| 777 | config := &ConfigData{ |
| 778 | Scopes: map[string]ScopeConfig{ |
| 779 | "cli/graph": {Paths: []string{"apps/cli/internal/graph/"}}, |
| 780 | "web/board": {Paths: []string{"apps/web/src/components/board/"}}, |
| 781 | }, |
| 782 | TopKeys: []string{"scopes", "dir", "web"}, |
| 783 | ConfigPath: ".taskmd.yaml", |
| 784 | } |
| 785 | |
| 786 | result := v.ValidateConfig(config) |
| 787 | |
| 788 | if result.Errors != 0 { |
| 789 | t.Errorf("Expected no errors, got %d", result.Errors) |
| 790 | for _, issue := range result.Issues { |
| 791 | t.Logf(" Issue: [%s] %s", issue.Level, issue.Message) |
| 792 | } |
| 793 | } |
| 794 | if result.Warnings != 0 { |
| 795 | t.Errorf("Expected no warnings, got %d", result.Warnings) |
| 796 | } |
| 797 | } |
| 798 | |
| 799 | func TestValidateConfig_MissingPaths(t *testing.T) { |
| 800 | v := NewValidator(false) |
nothing calls this directly
no test coverage detected