MCPcopy
hub / github.com/moncho/dry / TestLessModel_QCloses

Function TestLessModel_QCloses

appui/overlay_test.go:102–115  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

100}
101
102func TestLessModel_QCloses(t *testing.T) {
103 m := NewLessModel()
104 m.SetSize(80, 24)
105 m.SetContent("content", "Test")
106
107 _, cmd := m.Update(tea.KeyPressMsg{Code: 'q'})
108 if cmd == nil {
109 t.Fatal("expected cmd from q")
110 }
111 msg := cmd()
112 if _, ok := msg.(CloseOverlayMsg); !ok {
113 t.Fatalf("expected CloseOverlayMsg, got %T", msg)
114 }
115}
116
117func TestLessModel_SearchMode(t *testing.T) {
118 m := NewLessModel()

Callers

nothing calls this directly

Calls 4

SetSizeMethod · 0.95
SetContentMethod · 0.95
UpdateMethod · 0.95
NewLessModelFunction · 0.85

Tested by

no test coverage detected