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

Function TestBuildTableConfig

pkg/console/render_test.go:258–272  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

256}
257
258func 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
274func TestFormatTag_Number(t *testing.T) {
275 type TestMetrics struct {

Callers

nothing calls this directly

Calls 1

buildTableConfigFunction · 0.85

Tested by

no test coverage detected