TestRedundantResizeIsNoOp: a WindowSizeMsg with unchanged dimensions (some terminals send these on focus) must not fire the hardening path; clearing the screen for a non-event flickers for no benefit.
(t *testing.T)
| 164 | // (some terminals send these on focus) must not fire the hardening path; |
| 165 | // clearing the screen for a non-event flickers for no benefit. |
| 166 | func TestRedundantResizeIsNoOp(t *testing.T) { |
| 167 | cfg, _, _ := config.Bootstrap(t.TempDir()) |
| 168 | m := New(cfg, llm.New("http://x", cfg.ActiveProfile().LLM, ""), t.TempDir(), "test") |
| 169 | var mm tea.Model = m |
| 170 | |
| 171 | mm, _ = mm.Update(tea.WindowSizeMsg{Width: 80, Height: 24}) |
| 172 | _, cmd := mm.Update(tea.WindowSizeMsg{Width: 80, Height: 24}) |
| 173 | if cmdYieldsClearScreen(cmd) { |
| 174 | t.Error("same-size resize must not request ClearScreen") |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | // TestWidenResizeAlsoSuppresses: widening changes the splash layout |
| 179 | // (text→art at the wordmark threshold) and leaves narrow rows misplaced, |
nothing calls this directly
no test coverage detected