TestSkillInstallWritesBothHooks verifies install wires up BOTH the SessionStart hook and the UserPromptSubmit drift/close-out hook into ~/.claude/settings.json.
(t *testing.T)
| 162 | t.Errorf("update rc=%d, want 0", rc) |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | func 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 | |
| 183 | func TestSkillUninstallIdempotent(t *testing.T) { |
nothing calls this directly
no test coverage detected