MCPcopy Create free account
hub / github.com/driangle/taskmd / TestValidateConfig_ValidScopes

Function TestValidateConfig_ValidScopes

sdk/go/validator/validator_test.go:775–797  ·  view source on GitHub ↗

--- Config validation tests ---

(t *testing.T)

Source from the content-addressed store, hash-verified

773// --- Config validation tests ---
774
775func 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
799func TestValidateConfig_MissingPaths(t *testing.T) {
800 v := NewValidator(false)

Callers

nothing calls this directly

Calls 2

ValidateConfigMethod · 0.95
NewValidatorFunction · 0.85

Tested by

no test coverage detected