TestStylesExist verifies that all expected styles are defined
(t *testing.T)
| 99 | |
| 100 | // TestStylesExist verifies that all expected styles are defined |
| 101 | func 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 |
| 144 | func TestStylesRenderNonEmpty(t *testing.T) { |