MCPcopy Create free account
hub / github.com/diillson/chatcli / TestFormatSkillIndex

Function TestFormatSkillIndex

cli/selfevolve_test.go:212–228  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

210}
211
212func 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
230func TestApplySkillCandidates_EvolvesEngineOwnedSkill(t *testing.T) {
231 dir := t.TempDir()

Callers

nothing calls this directly

Calls 2

formatSkillIndexFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected