MCPcopy Create free account
hub / github.com/cli/cli / TestRenderTableUsesAgentHeader

Function TestRenderTableUsesAgentHeader

pkg/cmd/skills/list/list_test.go:491–507  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

489}
490
491func TestRenderTableUsesAgentHeader(t *testing.T) {
492 ios, _, stdout, _ := iostreams.Test()
493 ios.SetStdoutTTY(true)
494
495 err := renderTable(ios, []listedSkill{{
496 skillName: "git-commit",
497 agentHostIDs: []string{"github-copilot", "cursor"},
498 scope: "project",
499 source: "monalisa/skills-repo",
500 version: "v1.0.0",
501 }})
502
503 require.NoError(t, err)
504 assert.Contains(t, stdout.String(), "AGENT")
505 assert.Contains(t, stdout.String(), "github-copilot, cursor")
506 assert.NotContains(t, stdout.String(), "HOST")
507}
508
509func writeSkill(t *testing.T, baseDir, relDir, content string) {
510 t.Helper()

Callers

nothing calls this directly

Calls 5

TestFunction · 0.92
SetStdoutTTYMethod · 0.80
ContainsMethod · 0.80
renderTableFunction · 0.70
StringMethod · 0.65

Tested by

no test coverage detected