(t *testing.T)
| 1520 | } |
| 1521 | |
| 1522 | func TestMatchesSkillPath(t *testing.T) { |
| 1523 | tests := []struct { |
| 1524 | name string |
| 1525 | path string |
| 1526 | wantName string |
| 1527 | }{ |
| 1528 | {name: "skills convention", path: "skills/code-review/SKILL.md", wantName: "code-review"}, |
| 1529 | {name: "namespaced convention", path: "skills/monalisa/issue-triage/SKILL.md", wantName: "issue-triage"}, |
| 1530 | {name: "plugins convention", path: "plugins/hubot/skills/pr-summary/SKILL.md", wantName: "pr-summary"}, |
| 1531 | {name: "non-skill file", path: "README.md", wantName: ""}, |
| 1532 | {name: "non-SKILL.md in skill dir", path: "skills/code-review/prompt.txt", wantName: ""}, |
| 1533 | {name: "nested skills convention", path: "terraform/code-generation/skills/terraform-style-guide/SKILL.md", wantName: "terraform-style-guide"}, |
| 1534 | } |
| 1535 | for _, tt := range tests { |
| 1536 | t.Run(tt.name, func(t *testing.T) { |
| 1537 | assert.Equal(t, tt.wantName, MatchesSkillPath(tt.path)) |
| 1538 | }) |
| 1539 | } |
| 1540 | } |
| 1541 | |
| 1542 | func TestMatchSkillPath(t *testing.T) { |
| 1543 | tests := []struct { |
nothing calls this directly
no test coverage detected