Skip to content

Commit

Permalink
chore: fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanHope committed Jan 12, 2024
1 parent 37a4ca6 commit 2f253ad
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/cli/tui/header/header_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestCanUpdateWidth(t *testing.T) {
width: 1,
}

verifyUpdate(t, gotModel, wantModel, gotCmd, nil)
verifyUpdate(t, gotModel, wantModel, gotCmd)
}

func TestCanUpdateNav(t *testing.T) {
Expand All @@ -33,7 +33,7 @@ func TestCanUpdateNav(t *testing.T) {
nav: "nav",
}

verifyUpdate(t, gotModel, wantModel, gotCmd, nil)
verifyUpdate(t, gotModel, wantModel, gotCmd)
}

func TestCanMarkBusy(t *testing.T) {
Expand All @@ -44,7 +44,7 @@ func TestCanMarkBusy(t *testing.T) {
busy: true,
}

verifyUpdate(t, gotModel, wantModel, gotCmd, nil)
verifyUpdate(t, gotModel, wantModel, gotCmd)
}

func TestCanMarkFree(t *testing.T) {
Expand All @@ -57,7 +57,7 @@ func TestCanMarkFree(t *testing.T) {
busy: false,
}

verifyUpdate(t, gotModel, wantModel, gotCmd, nil)
verifyUpdate(t, gotModel, wantModel, gotCmd)
}

func TestBusy(t *testing.T) {
Expand All @@ -71,12 +71,12 @@ func TestBusy(t *testing.T) {
}
}

func verifyUpdate(t *testing.T, gotModel HeaderModel, wantModel HeaderModel, gotCmd tea.Cmd, wantCmd tea.Cmd) {
func verifyUpdate(t *testing.T, gotModel HeaderModel, wantModel HeaderModel, gotCmd tea.Cmd) {
unexported := cmp.AllowUnexported(HeaderModel{})
modelDiff := cmp.Diff(gotModel, wantModel, unexported)
if modelDiff != "" {
t.Errorf("Expected and actual models different:\n%s", modelDiff)
}

utils.CompareCommands(t, gotCmd, wantCmd)
utils.CompareCommands(t, gotCmd, nil)
}

0 comments on commit 2f253ad

Please sign in to comment.