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

Function TestStatusBarShowsSessionTokens

internal/tui/tui_test.go:2272–2282  ·  view source on GitHub ↗

TestStatusBarShowsSessionTokens: once the counter is non-zero it appears in the status bar; at zero the bar stays quiet.

(t *testing.T)

Source from the content-addressed store, hash-verified

2270// before any EventDone: the "tokens stream immediately" promise.
2271func TestStreamContentShowsLiveInViewport(t *testing.T) {
2272 m := newTestModel(t, func(http.ResponseWriter, *http.Request) {})
2273 m.phase = phaseThinking
2274 out, _ := m.handleStream(llm.Event{Kind: llm.EventContent, Content: "hello world"})
2275 om := out.(Model)
2276 if om.phase != phaseStreaming {
2277 t.Fatalf("first content chunk should promote phase to streaming, got %v", om.phase)
2278 }
2279 if om.streaming.String() != "hello world" {
2280 t.Fatalf("streaming buffer should contain raw content, got %q", om.streaming.String())
2281 }
2282 if om.scroll.Len() != 0 {
2283 t.Fatalf("scroll should still be empty before flush, got %q", om.scroll.String())
2284 }
2285 if !strings.Contains(om.View(), "hello world") {

Callers

nothing calls this directly

Calls 2

newTestModelFunction · 0.85
renderStatusBarMethod · 0.80

Tested by

no test coverage detected