Skip to content

Commit e209532

Browse files
committed
fix failing test
Signed-off-by: Ayush <mail@ayuch.dev>
1 parent 2f41a74 commit e209532

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

internal/tui/model_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,17 +371,16 @@ func TestModel_LineSelectionAndScrolling(t *testing.T) {
371371

372372
func TestModel_Update_FileWatcher(t *testing.T) {
373373
m := initialModel()
374-
// Use the blank identifier _ to ignore the returned model
375374
_, cmd := m.Update(fileWatcherMsg{})
376375

377376
if cmd == nil {
378377
t.Fatal("expected a command to be returned")
379378
}
380379

381380
cmds := cmd().(tea.BatchMsg)
382-
// Cast totalPanels to an int for comparison
383-
if len(cmds) != int(totalPanels) {
384-
t.Errorf("expected %d commands, got %d", totalPanels, len(cmds))
381+
expectedCmds := 5
382+
if len(cmds) != expectedCmds {
383+
t.Errorf("expected %d commands, got %d", expectedCmds, len(cmds))
385384
}
386385
}
387386

0 commit comments

Comments
 (0)