(t *testing.T)
| 256 | } |
| 257 | |
| 258 | func TestBuildTableConfig(t *testing.T) { |
| 259 | jobs := []TestJob{ |
| 260 | {Name: "job-1", Status: "completed", Conclusion: "success"}, |
| 261 | {Name: "job-2", Status: "in_progress", Conclusion: ""}, |
| 262 | } |
| 263 | |
| 264 | val := reflect.ValueOf(jobs) |
| 265 | config := buildTableConfig(val, "Test Jobs") |
| 266 | |
| 267 | assert.Len(t, config.Headers, 3, "expected 3 headers (excluding omitempty empty fields)") |
| 268 | assert.Len(t, config.Rows, 2, "expected 2 rows in table output") |
| 269 | |
| 270 | // Check first row |
| 271 | assert.Equal(t, "job-1", config.Rows[0][0], "first row name should be job-1") |
| 272 | } |
| 273 | |
| 274 | func TestFormatTag_Number(t *testing.T) { |
| 275 | type TestMetrics struct { |
nothing calls this directly
no test coverage detected