TestFirstResizeDoesNotClearScreen: the first WindowSizeMsg must not ClearScreen; the terminal still holds the user's pre-launch shell output; wiping it would feel destructive. Only the splash is printed.
(t *testing.T)
| 43 | // ClearScreen; the terminal still holds the user's pre-launch shell |
| 44 | // output; wiping it would feel destructive. Only the splash is printed. |
| 45 | func TestFirstResizeDoesNotClearScreen(t *testing.T) { |
| 46 | cfg, _, _ := config.Bootstrap(t.TempDir()) |
| 47 | m := New(cfg, llm.New("http://x", cfg.ActiveProfile().LLM, ""), t.TempDir(), "test") |
| 48 | |
| 49 | _, cmd := m.Update(tea.WindowSizeMsg{Width: 80, Height: 24}) |
| 50 | if cmdYieldsClearScreen(cmd) { |
| 51 | t.Error("first WindowSizeMsg must not request ClearScreen") |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | // TestWidthChangeSuppressesView: any width change (narrow OR widen) flips |
| 56 | // suppressView so nothing commits between SIGWINCH and the settle. View() |
nothing calls this directly
no test coverage detected