MCPcopy Create free account
hub / github.com/Facets-cloud/flow / TestSkillInstallForceOverwrites

Function TestSkillInstallForceOverwrites

internal/app/skill_test.go:101–123  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

99}
100
101func TestSkillInstallWritesFile(t *testing.T) {
102 home := withTempHome(t)
103
104 rc := cmdSkill([]string{"install"})
105 if rc != 0 {
106 t.Fatalf("install rc=%d", rc)
107 }
108 path := filepath.Join(home, ".claude", "skills", "flow", "SKILL.md")
109 data, err := os.ReadFile(path)
110 if err != nil {
111 t.Fatalf("read: %v", err)
112 }
113 if !strings.Contains(string(data), "name: flow") {
114 t.Errorf("installed skill missing frontmatter 'name: flow'")
115 }
116 if !strings.Contains(string(data), "---") {
117 t.Errorf("installed skill missing YAML frontmatter delimiters")
118 }
119}
120
121func TestSkillInstallErrorsOnExisting(t *testing.T) {
122 withTempHome(t)
123 if rc := cmdSkill([]string{"install"}); rc != 0 {
124 t.Fatalf("first install rc=%d", rc)
125 }
126 if rc := cmdSkill([]string{"install"}); rc == 0 {

Callers

nothing calls this directly

Calls 3

withTempHomeFunction · 0.85
cmdSkillFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected