MCPcopy
hub / github.com/github/github-mcp-server / TestToolsetMetadataHasIcons

Function TestToolsetMetadataHasIcons

pkg/github/toolset_icons_test.go:69–88  ·  view source on GitHub ↗

TestToolsetMetadataHasIcons ensures all toolsets have icons defined. This is a policy test - if you want to allow toolsets without icons, you can remove or modify this test.

(t *testing.T)

Source from the content-addressed store, hash-verified

67// This is a policy test - if you want to allow toolsets without icons,
68// you can remove or modify this test.
69func TestToolsetMetadataHasIcons(t *testing.T) {
70 // These toolsets are expected to NOT have icons (internal/special purpose)
71 exceptionsWithoutIcons := map[string]bool{
72 "all": true, // Meta-toolset
73 "default": true, // Meta-toolset
74 }
75
76 inv, err := NewInventory(stubTranslator).Build()
77 require.NoError(t, err)
78 toolsets := inv.AvailableToolsets()
79
80 for _, ts := range toolsets {
81 if exceptionsWithoutIcons[string(ts.ID)] {
82 continue
83 }
84 t.Run(string(ts.ID), func(t *testing.T) {
85 assert.NotEmpty(t, ts.Icon, "toolset %s should have an icon defined", ts.ID)
86 })
87 }
88}

Callers

nothing calls this directly

Calls 3

NewInventoryFunction · 0.85
BuildMethod · 0.80
AvailableToolsetsMethod · 0.80

Tested by

no test coverage detected