MCPcopy Index your code
hub / github.com/github/github-mcp-server / TestAllToolsHaveHandlerFunc

Function TestAllToolsHaveHandlerFunc

pkg/github/tools_validation_test.go:162–173  ·  view source on GitHub ↗

TestAllToolsHaveHandlerFunc ensures all tools have a handler function

(t *testing.T)

Source from the content-addressed store, hash-verified

160
161// TestAllToolsHaveHandlerFunc ensures all tools have a handler function
162func TestAllToolsHaveHandlerFunc(t *testing.T) {
163 tools := AllTools(stubTranslation)
164
165 for _, tool := range tools {
166 t.Run(tool.Tool.Name, func(t *testing.T) {
167 assert.NotNil(t, tool.HandlerFunc,
168 "Tool %q must have a HandlerFunc", tool.Tool.Name)
169 assert.True(t, tool.HasHandler(),
170 "Tool %q HasHandler() should return true", tool.Tool.Name)
171 })
172 }
173}
174
175// TestToolsetMetadataConsistency ensures tools in the same toolset have consistent descriptions
176func TestToolsetMetadataConsistency(t *testing.T) {

Callers

nothing calls this directly

Calls 2

AllToolsFunction · 0.85
HasHandlerMethod · 0.45

Tested by

no test coverage detected