fix(theming): restore gruvbox as default via Default() helper
This commit is contained in:
@@ -160,7 +160,7 @@ func TestPlanAfterApplyIsEmpty(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestUnknownThemeFallsBackToFirst(t *testing.T) {
|
||||
func TestUnknownThemeFallsBackToDefault(t *testing.T) {
|
||||
home := t.TempDir()
|
||||
t.Setenv("HOME", home)
|
||||
r := &fakeRunner{installed: map[string]bool{"neovim": true}}
|
||||
@@ -171,9 +171,8 @@ func TestUnknownThemeFallsBackToFirst(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
chadrc, _ := os.ReadFile(filepath.Join(home, ".config", "nvim", "lua", "chadrc.lua"))
|
||||
// Unknown theme IDs fall back to the first entry of theming.List(),
|
||||
// which is sorted alphabetically by ID (currently "catppuccin").
|
||||
if !strings.Contains(string(chadrc), `theme = "catppuccin"`) {
|
||||
// Unknown theme IDs fall back to theming.Default(), which is gruvbox.
|
||||
if !strings.Contains(string(chadrc), `theme = "gruvbox"`) {
|
||||
t.Fatalf("fallback theme not applied: %s", chadrc)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user