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

Function TestFormatMemoryNotice

cli/memory_extras_test.go:58–68  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

56}
57
58func TestFormatMemoryNotice(t *testing.T) {
59 // Empty summary -> empty notice.
60 if s := formatMemoryNotice(memory.ExtractionSummary{}); s != "" {
61 t.Errorf("empty summary should yield empty notice, got %q", s)
62 }
63 // Non-empty summary -> non-empty notice mentioning the prefix.
64 s := formatMemoryNotice(memory.ExtractionSummary{FactsAdded: 2, ProfileUpdated: true, ProjectsUpserted: 1, TopicsRecorded: 3})
65 if s == "" {
66 t.Error("non-empty summary should yield a notice")
67 }
68}
69
70func TestSplitProfileKV(t *testing.T) {
71 cases := []struct {

Callers

nothing calls this directly

Calls 3

formatMemoryNoticeFunction · 0.85
ErrorfMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected