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

Function TestGetRecentDailyNotes

cli/workspace/memory_test.go:81–95  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

79}
80
81func TestGetRecentDailyNotes(t *testing.T) {
82 dir := t.TempDir()
83 ms := NewMemoryStore(dir, testLogger())
84
85 // Create today's note
86 _ = ms.WriteDailyNote("today's entry")
87
88 notes := ms.GetRecentDailyNotes(3)
89 if len(notes) != 1 {
90 t.Errorf("expected 1 note, got %d", len(notes))
91 }
92 if len(notes) > 0 && !strings.Contains(notes[0].Content, "today's entry") {
93 t.Error("expected today's entry in notes")
94 }
95}
96
97func TestGetMemoryContext(t *testing.T) {
98 dir := t.TempDir()

Callers

nothing calls this directly

Calls 6

WriteDailyNoteMethod · 0.95
GetRecentDailyNotesMethod · 0.95
ErrorfMethod · 0.80
NewMemoryStoreFunction · 0.70
testLoggerFunction · 0.70
ErrorMethod · 0.65

Tested by

no test coverage detected