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

Function TestLessModel_FollowToggle

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

Source from the content-addressed store, hash-verified

151}
152
153func TestLessModel_FollowToggle(t *testing.T) {
154 m := NewLessModel()
155 m.SetSize(80, 24)
156 m.SetContent("line1\nline2", "Test")
157
158 if m.following {
159 t.Fatal("expected not following initially")
160 }
161
162 m, _ = m.Update(tea.KeyPressMsg{Code: 'f'})
163 if !m.following {
164 t.Fatal("expected following after f")
165 }
166
167 m, _ = m.Update(tea.KeyPressMsg{Code: 'f'})
168 if m.following {
169 t.Fatal("expected not following after second f")
170 }
171}
172
173func TestQuickPeekModel_SpaceCloses(t *testing.T) {
174 m := NewQuickPeekModel()

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