MCPcopy Create free account
hub / github.com/cli/cli / TestUniqueProjectDirs

Function TestUniqueProjectDirs

internal/skills/registry/registry_test.go:310–324  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

308}
309
310func TestUniqueProjectDirs(t *testing.T) {
311 dirs := UniqueProjectDirs()
312 seen := map[string]int{}
313 for _, d := range dirs {
314 seen[d]++
315 }
316 // The shared .agents/skills dir and .claude/skills must both be present
317 // and listed exactly once each.
318 assert.Equal(t, 1, seen[".agents/skills"], "expected .agents/skills exactly once")
319 assert.Equal(t, 1, seen[".claude/skills"], "expected .claude/skills exactly once")
320 // No project dir should appear more than once.
321 for d, n := range seen {
322 assert.LessOrEqualf(t, n, 1, "project dir %q appears %d times", d, n)
323 }
324}
325
326func TestScopeLabels(t *testing.T) {
327 tests := []struct {

Callers

nothing calls this directly

Calls 2

UniqueProjectDirsFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected