Skip to content

Commit

Permalink
💚 config test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjazz committed May 6, 2024
1 parent 9960f1c commit 61ab807
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,27 @@ import (

func TestConfig(t *testing.T) {
config := Config{
Spinner: spinner.Dot,
ProgressOption: progress.WithDefaultGradient(),
Options: ConfigOptions{
ExitOnFailure: true,
},
Spinner: spinner.Dot,
Colors: ConfigColors{
Spinner: lipgloss.Color("214"),
Pending: lipgloss.Color("21"),
Success: lipgloss.Color("46"),
Failure: lipgloss.Color("196"),
Spinner: lipgloss.Color("214"),
Pending: lipgloss.Color("21"),
Success: lipgloss.Color("46"),
Failure: lipgloss.Color("196"),
ParentStarted: lipgloss.Color("214"),
},
Chars: ConfigChars{
ParentStarted: "»",
NotStarted: "•",
Success: "✔",
Failure: "✘",
},
ProgressOptions: []progress.Option{
progress.WithDefaultGradient(),
progress.WithoutPercentage(),
progress.WithWidth(10),
},
}

Expand All @@ -39,4 +53,8 @@ func TestConfig(t *testing.T) {
if config.Colors.Failure != lipgloss.Color("196") {
t.Errorf("Expected failure color to be '196', got '%s'", config.Colors.Failure)
}

if config.Options.ExitOnFailure != true {
t.Errorf("Expected ExitOnFailure to be 'true', got '%v'", config.Options.ExitOnFailure)
}
}

0 comments on commit 61ab807

Please sign in to comment.