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

Function TestNoDuplicatePromptNames

pkg/github/tools_validation_test.go:149–159  ·  view source on GitHub ↗

TestNoDuplicatePromptNames ensures all prompts have unique names

(t *testing.T)

Source from the content-addressed store, hash-verified

147
148// TestNoDuplicatePromptNames ensures all prompts have unique names
149func TestNoDuplicatePromptNames(t *testing.T) {
150 prompts := AllPrompts(stubTranslation)
151 seen := make(map[string]bool)
152
153 for _, prompt := range prompts {
154 name := prompt.Prompt.Name
155 assert.False(t, seen[name],
156 "Duplicate prompt name found: %q", name)
157 seen[name] = true
158 }
159}
160
161// TestAllToolsHaveHandlerFunc ensures all tools have a handler function
162func TestAllToolsHaveHandlerFunc(t *testing.T) {

Callers

nothing calls this directly

Calls 1

AllPromptsFunction · 0.85

Tested by

no test coverage detected