MCPcopy Index your code
hub / github.com/codehamr/codehamr / TestWrapRowsMatchesBubblesBehaviour

Function TestWrapRowsMatchesBubblesBehaviour

internal/tui/tui_test.go:2330–2352  ·  view source on GitHub ↗

TestWrapRowsMatchesBubblesBehaviour: wrapRows must match the row count of bubbles/textarea's internal wrap(): word-boundary aware, hard-wrap fallback for over-wide single words, and a trailing cursor-anchor row when content exactly fills the width.

(t *testing.T)

Source from the content-addressed store, hash-verified

2328 m.lastOutcome = outcomeDone
2329 m.lastElapsed = 100 * time.Second
2330 m.lastTokens = 5000
2331 bar = stripANSI(m.renderStatusBar())
2332 if !strings.Contains(bar, "✓ 1m 40s") {
2333 t.Fatalf("idle bar should show frozen outcome + duration: %q", bar)
2334 }
2335 if !strings.Contains(bar, "50 tok/s avg") {
2336 t.Fatalf("idle bar should show the avg rate: %q", bar)
2337 }
2338}
2339
2340// TestClearResetsSessionTokens: /clear wipes the conversation AND the
2341// session counter: starting over from zero is the whole point.
2342func TestClearResetsSessionTokens(t *testing.T) {
2343 m := newTestModel(t, func(http.ResponseWriter, *http.Request) {})
2344 m.sessionTokens = 999
2345 out, _ := m.runSlash("/clear")
2346 if got := out.(Model).sessionTokens; got != 0 {
2347 t.Fatalf("/clear should reset sessionTokens to 0, got %d", got)
2348 }
2349}
2350
2351// TestWrapRowsMatchesBubblesBehaviour: wrapRows must match the row count of
2352// bubbles/textarea's internal wrap(): word-boundary aware, hard-wrap fallback
2353// for over-wide single words, and a trailing cursor-anchor row when content
2354// exactly fills the width.
2355func TestWrapRowsMatchesBubblesBehaviour(t *testing.T) {

Callers

nothing calls this directly

Calls 1

wrapRowsFunction · 0.85

Tested by

no test coverage detected