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

Function mockPrompt

pkg/inventory/registry_test.go:677–685  ·  view source on GitHub ↗

mockPrompt creates a minimal ServerPrompt for testing

(name string, toolsetID string)

Source from the content-addressed store, hash-verified

675
676// mockPrompt creates a minimal ServerPrompt for testing
677func mockPrompt(name string, toolsetID string) ServerPrompt {
678 return NewServerPrompt(
679 testToolsetMetadata(toolsetID),
680 mcp.Prompt{Name: name},
681 func(_ context.Context, _ *mcp.GetPromptRequest) (*mcp.GetPromptResult, error) {
682 return nil, nil
683 },
684 )
685}
686
687func TestForMCPRequest_Initialize(t *testing.T) {
688 tools := []ServerTool{

Calls 2

NewServerPromptFunction · 0.85
testToolsetMetadataFunction · 0.85

Tested by

no test coverage detected