(b *testing.B)
| 118 | } |
| 119 | |
| 120 | func BenchmarkExtractDomainFromURL(b *testing.B) { |
| 121 | testCases := []string{ |
| 122 | "https://api.github.com/repos", |
| 123 | "http://example.com:8080/path", |
| 124 | "mcp.example.com", |
| 125 | "github.com:443", |
| 126 | } |
| 127 | |
| 128 | for _, tc := range testCases { |
| 129 | b.Run(tc, func(b *testing.B) { |
| 130 | for range b.N { |
| 131 | _ = ExtractDomainFromURL(tc) |
| 132 | } |
| 133 | }) |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | func TestNormalizeGitHubHostURL(t *testing.T) { |
| 138 | tests := []struct { |
nothing calls this directly
no test coverage detected