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

Function TestWidenResizeAlsoSuppresses

internal/tui/resize_test.go:182–197  ·  view source on GitHub ↗

TestWidenResizeAlsoSuppresses: widening changes the splash layout (text→art at the wordmark threshold) and leaves narrow rows misplaced, so it takes the same suppress + settle-replay path as narrowing. The immediate cmd is the debounce tick; the clear lands on settle.

(t *testing.T)

Source from the content-addressed store, hash-verified

180// so it takes the same suppress + settle-replay path as narrowing. The
181// immediate cmd is the debounce tick; the clear lands on settle.
182func TestWidenResizeAlsoSuppresses(t *testing.T) {
183 cfg, _, _ := config.Bootstrap(t.TempDir())
184 m := New(cfg, llm.New("http://x", cfg.ActiveProfile().LLM, ""), t.TempDir(), "test")
185 var mm tea.Model = m
186
187 mm, _ = mm.Update(tea.WindowSizeMsg{Width: 60, Height: 24})
188 mm, cmd := mm.Update(tea.WindowSizeMsg{Width: 80, Height: 24})
189 nm := mm.(Model)
190
191 if !nm.suppressView {
192 t.Error("widening must enable suppressView so the eventual settle cleanly replays the new layout")
193 }
194 if cmd == nil {
195 t.Error("widening must schedule a settle tick")
196 }
197}
198
199// TestHeightOnlyResizeDoesNotClear: a height-only change can't induce the
200// soft-wrap that breaks bubbletea's cursor math (no line widens), so the

Callers

nothing calls this directly

Calls 6

UpdateMethod · 0.95
BootstrapFunction · 0.92
NewFunction · 0.92
ActiveProfileMethod · 0.80
ErrorMethod · 0.80
NewFunction · 0.70

Tested by

no test coverage detected