MCPcopy Create free account
hub / github.com/codehamr/codehamr / TestClearWipesQueue

Function TestClearWipesQueue

internal/tui/queue_test.go:282–289  ·  view source on GitHub ↗

TestClearWipesQueue: /clear resets the conversation, so a queued follow-up must go with it (it would target a conversation that no longer exists).

(t *testing.T)

Source from the content-addressed store, hash-verified

280}
281
282// TestClearWipesQueue: /clear resets the conversation, so a queued follow-up must
283// go with it (it would target a conversation that no longer exists).
284func TestClearWipesQueue(t *testing.T) {
285 m := newTestModel(t, func(http.ResponseWriter, *http.Request) {})
286 m.queued = &queuedPrompt{send: "stale", echo: "stale"}
287 out, _ := m.runSlash("/clear")
288 if out.(Model).queued != nil {
289 t.Fatalf("/clear must wipe the queued slot, got %+v", out.(Model).queued)
290 }
291}
292

Callers

nothing calls this directly

Calls 2

newTestModelFunction · 0.85
runSlashMethod · 0.80

Tested by

no test coverage detected