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

Function TestHasToolset

pkg/inventory/registry_test.go:612–625  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

610}
611
612func TestHasToolset(t *testing.T) {
613 tools := []ServerTool{
614 mockTool("tool1", "toolset1", true),
615 }
616
617 reg := mustBuild(t, NewBuilder().SetTools(tools).WithToolsets([]string{"all"}))
618
619 if !reg.HasToolset("toolset1") {
620 t.Error("expected HasToolset to return true for existing toolset")
621 }
622 if reg.HasToolset("nonexistent") {
623 t.Error("expected HasToolset to return false for non-existent toolset")
624 }
625}
626
627func TestAllTools(t *testing.T) {
628 tools := []ServerTool{

Callers

nothing calls this directly

Calls 7

mustBuildFunction · 0.85
NewBuilderFunction · 0.85
WithToolsetsMethod · 0.80
SetToolsMethod · 0.80
HasToolsetMethod · 0.80
mockToolFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected