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

Function TestUserProfile_RecordCommand

cli/workspace/memory/profile_test.go:35–47  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

33}
34
35func TestUserProfile_RecordCommand(t *testing.T) {
36 dir := t.TempDir()
37 ps := NewUserProfileStore(dir, testLogger())
38
39 ps.RecordCommand("/memory")
40 ps.RecordCommand("/memory")
41 ps.RecordCommand("/compact")
42
43 p := ps.Get()
44 if p.TopCommands["/memory"] != 2 {
45 t.Errorf("expected /memory count 2, got %d", p.TopCommands["/memory"])
46 }
47}
48
49func TestUserProfile_Persistence(t *testing.T) {
50 dir := t.TempDir()

Callers

nothing calls this directly

Calls 5

RecordCommandMethod · 0.95
GetMethod · 0.95
NewUserProfileStoreFunction · 0.85
ErrorfMethod · 0.80
testLoggerFunction · 0.70

Tested by

no test coverage detected