(t *testing.T)
| 210 | } |
| 211 | |
| 212 | func TestFormatSkillIndex(t *testing.T) { |
| 213 | // Sorted, names + descriptions only — and crucially NO bodies. |
| 214 | out := formatSkillIndex( |
| 215 | []string{"zeta-skill", "alpha-skill"}, |
| 216 | map[string]string{"zeta-skill": "does zeta", "alpha-skill": "does alpha"}, |
| 217 | ) |
| 218 | if !strings.Contains(out, "alpha-skill — does alpha") || !strings.Contains(out, "zeta-skill — does zeta") { |
| 219 | t.Fatalf("index missing entries:\n%s", out) |
| 220 | } |
| 221 | // Stable order: alpha before zeta. |
| 222 | if strings.Index(out, "alpha-skill") > strings.Index(out, "zeta-skill") { |
| 223 | t.Fatalf("index not sorted:\n%s", out) |
| 224 | } |
| 225 | if formatSkillIndex(nil, nil) != "" { |
| 226 | t.Error("empty index should render empty") |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | func TestApplySkillCandidates_EvolvesEngineOwnedSkill(t *testing.T) { |
| 231 | dir := t.TempDir() |
nothing calls this directly
no test coverage detected