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

Function TestSkillInstallWritesBothHooks

internal/app/skill_test.go:164–180  ·  view source on GitHub ↗

TestSkillInstallWritesBothHooks verifies install wires up BOTH the SessionStart hook and the UserPromptSubmit drift/close-out hook into ~/.claude/settings.json.

(t *testing.T)

Source from the content-addressed store, hash-verified

162 t.Errorf("update rc=%d, want 0", rc)
163 }
164}
165
166func TestSkillUninstallRemovesDir(t *testing.T) {
167 home := withTempHome(t)
168 if rc := cmdSkill([]string{"install"}); rc != 0 {
169 t.Fatalf("install rc=%d", rc)
170 }
171 dir := filepath.Join(home, ".claude", "skills", "flow")
172 if _, err := os.Stat(dir); err != nil {
173 t.Fatalf("skill dir missing after install: %v", err)
174 }
175 if rc := cmdSkill([]string{"uninstall"}); rc != 0 {
176 t.Fatalf("uninstall rc=%d", rc)
177 }
178 if _, err := os.Stat(dir); !os.IsNotExist(err) {
179 t.Errorf("skill dir still present after uninstall: %v", err)
180 }
181}
182
183func TestSkillUninstallIdempotent(t *testing.T) {

Callers

nothing calls this directly

Calls 4

withTempHomeFunction · 0.85
cmdSkillFunction · 0.85
readSettingsFunction · 0.85

Tested by

no test coverage detected