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

Function TestParseScopeEntries_NonMapEntry

apps/cli/internal/cli/validate_test.go:1045–1060  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1043}
1044
1045func TestParseScopeEntries_NonMapEntry(t *testing.T) {
1046 // Test with a scope value that is not a map (e.g., a string)
1047 scopeMap := map[string]any{
1048 "simple": "not-a-map",
1049 }
1050
1051 scopes := parseScopeEntries(scopeMap)
1052
1053 sc, ok := scopes["simple"]
1054 if !ok {
1055 t.Fatal("expected scope 'simple' to exist")
1056 }
1057 if sc.Paths != nil {
1058 t.Errorf("expected nil paths for non-map entry, got %v", sc.Paths)
1059 }
1060}
1061
1062func TestParseScopeEntries_MissingPaths(t *testing.T) {
1063 // Scope entry with no paths key at all

Callers

nothing calls this directly

Calls 1

parseScopeEntriesFunction · 0.85

Tested by

no test coverage detected