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

Function TestDisplayNameHiddenDir

internal/skills/discovery/discovery_test.go:311–333  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

309}
310
311func TestDisplayNameHiddenDir(t *testing.T) {
312 tests := []struct {
313 name string
314 skill Skill
315 wantName string
316 }{
317 {
318 name: "hidden-dir skill",
319 skill: Skill{Name: "code-review", Convention: "hidden-dir"},
320 wantName: "[hidden-dir] code-review",
321 },
322 {
323 name: "hidden-dir-namespaced skill",
324 skill: Skill{Name: "code-review", Namespace: "monalisa", Convention: "hidden-dir-namespaced"},
325 wantName: "[hidden-dir] monalisa/code-review",
326 },
327 }
328 for _, tt := range tests {
329 t.Run(tt.name, func(t *testing.T) {
330 assert.Equal(t, tt.wantName, tt.skill.DisplayName())
331 })
332 }
333}
334
335func TestValidateName(t *testing.T) {
336 tests := []struct {

Callers

nothing calls this directly

Calls 3

EqualMethod · 0.80
RunMethod · 0.65
DisplayNameMethod · 0.65

Tested by

no test coverage detected