MCPcopy Create free account
hub / github.com/github/gh-aw / TestStylesExist

Function TestStylesExist

pkg/styles/theme_test.go:101–141  ·  view source on GitHub ↗

TestStylesExist verifies that all expected styles are defined

(t *testing.T)

Source from the content-addressed store, hash-verified

99
100// TestStylesExist verifies that all expected styles are defined
101func TestStylesExist(t *testing.T) {
102 // This test ensures the styles are properly initialized
103 // by checking they don't panic when accessed
104 styles := map[string]lipgloss.Style{
105 "Error": Error,
106 "Warning": Warning,
107 "Success": Success,
108 "Info": Info,
109 "FilePath": FilePath,
110 "LineNumber": LineNumber,
111 "ContextLine": ContextLine,
112 "Highlight": Highlight,
113 "Location": Location,
114 "Command": Command,
115 "Progress": Progress,
116 "Prompt": Prompt,
117 "Count": Count,
118 "Verbose": Verbose,
119 "ListHeader": ListHeader,
120 "ListItem": ListItem,
121 "TableHeader": TableHeader,
122 "TableCell": TableCell,
123 "TableTotal": TableTotal,
124 "TableTitle": TableTitle,
125 "TableBorder": TableBorder,
126 "ServerName": ServerName,
127 "ServerType": ServerType,
128 "ErrorBox": ErrorBox,
129 "Header": Header,
130 }
131
132 for name, style := range styles {
133 t.Run(name, func(t *testing.T) {
134 // Render a test string to verify the style works
135 result := style.Render("test")
136 if result == "" {
137 t.Errorf("Style %s rendered empty string", name)
138 }
139 })
140 }
141}
142
143// TestStylesRenderNonEmpty verifies that styles can render text
144func TestStylesRenderNonEmpty(t *testing.T) {

Callers

nothing calls this directly

Calls 3

RenderMethod · 0.65
RunMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected