package theme import ( "testing" "github.com/alecthomas/chroma/v2/styles" ) func TestEveryThemeHasChromaStyle(t *testing.T) { for _, name := range Names() { s, ok := chromaStyles[name] if !ok { t.Errorf("theme %q has no chroma mapping", name) continue } if _, ok := styles.Registry[s]; !ok { t.Errorf("theme %q maps to unknown chroma style %q", name, s) } } if len(chromaStyles) != len(Names()) { t.Errorf("mapping has %d entries for %d themes", len(chromaStyles), len(Names())) } if ChromaStyle("no-such-theme") != "catppuccin-mocha" { t.Error("fallback") } }