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

Function TestFirstResizeDoesNotClearScreen

internal/tui/resize_test.go:45–53  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

43// ClearScreen; the terminal still holds the user's pre-launch shell
44// output; wiping it would feel destructive. Only the splash is printed.
45func 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()

Callers

nothing calls this directly

Calls 7

BootstrapFunction · 0.92
NewFunction · 0.92
cmdYieldsClearScreenFunction · 0.85
ActiveProfileMethod · 0.80
ErrorMethod · 0.80
NewFunction · 0.70
UpdateMethod · 0.45

Tested by

no test coverage detected