We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2d3de1 commit 4b2eb7aCopy full SHA for 4b2eb7a
1 file changed
internal/shell/model_test.go
@@ -516,6 +516,21 @@ func TestHostnames(t *testing.T) {
516
}
517
518
519
+func TestWindowSizeMsgSetsViewportAndInput(t *testing.T) {
520
+ m := initialModel(nil, nil, nil)
521
+ updated, cmd := m.Update(tea.WindowSizeMsg{Width: 120, Height: 40})
522
+ if cmd != nil {
523
+ t.Fatalf("expected nil cmd, got %v", cmd)
524
+ }
525
+ um := updated.(model)
526
+ if um.viewport.Width() != 120 {
527
+ t.Fatalf("expected viewport width 120, got %d", um.viewport.Width())
528
529
+ if um.viewport.Height() != 39 {
530
+ t.Fatalf("expected viewport height 39, got %d", um.viewport.Height())
531
532
+}
533
+
534
func TestInitReturnsNilCmdWithoutEvents(t *testing.T) {
535
m := initialModel(nil, nil, nil)
536
if cmd := m.Init(); cmd != nil {
0 commit comments