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)
| 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. |
| 2342 | func 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. |
| 2355 | func TestWrapRowsMatchesBubblesBehaviour(t *testing.T) { |
nothing calls this directly
no test coverage detected