(t *testing.T, m *model)
| 273 | } |
| 274 | |
| 275 | func testModelScrollingCore(t *testing.T, m *model) { |
| 276 | for range ScrollDownCount { |
| 277 | TeaUpdate(m, tea.KeyPressMsg{Code: tea.KeyDown}) |
| 278 | } |
| 279 | assertLayoutValidity(t, m) |
| 280 | |
| 281 | // Scroll up |
| 282 | for range ScrollUpCount { |
| 283 | TeaUpdate(m, tea.KeyPressMsg{Code: tea.KeyUp}) |
| 284 | } |
| 285 | assertLayoutValidity(t, m) |
| 286 | } |
| 287 | |
| 288 | func assertLayoutValidity(t *testing.T, m *model) { |
| 289 | // Skip for edge conditions where terminal is too small |
no test coverage detected