MCPcopy Index your code
hub / github.com/cli/cli / TestInstallName

Function TestInstallName

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

Source from the content-addressed store, hash-verified

15)
16
17func TestInstallName(t *testing.T) {
18 tests := []struct {
19 name string
20 skill Skill
21 wantName string
22 }{
23 {
24 name: "plain skill",
25 skill: Skill{Name: "code-review"},
26 wantName: "code-review",
27 },
28 {
29 name: "namespaced skill",
30 skill: Skill{Name: "issue-triage", Namespace: "monalisa"},
31 wantName: "monalisa/issue-triage",
32 },
33 {
34 name: "plugin skill with namespace",
35 skill: Skill{Name: "pr-summary", Namespace: "hubot", Convention: "plugins"},
36 wantName: "hubot/pr-summary",
37 },
38 }
39 for _, tt := range tests {
40 t.Run(tt.name, func(t *testing.T) {
41 assert.Equal(t, tt.wantName, tt.skill.InstallName())
42 })
43 }
44}
45
46func TestMatchSkillConventions(t *testing.T) {
47 tests := []struct {

Callers

nothing calls this directly

Calls 3

EqualMethod · 0.80
InstallNameMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected