forked from oomol-lab/open-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefinition.test.ts
More file actions
23 lines (20 loc) · 975 Bytes
/
Copy pathdefinition.test.ts
File metadata and controls
23 lines (20 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { describe, expect, it } from "vitest";
import { provider } from "./definition.ts";
describe("Cloudflare MCP provider definition", () => {
it("supports Cloudflare MCP OAuth and API Bearer tokens", () => {
const oauth = provider.auth.find((auth) => auth.type === "oauth2");
const apiKey = provider.auth.find((auth) => auth.type === "api_key");
expect(oauth).toMatchObject({
authorizationUrl: "https://mcp.cloudflare.com/authorize",
tokenUrl: "https://mcp.cloudflare.com/token",
refreshTokenUrl: "https://mcp.cloudflare.com/token",
tokenEndpointAuthMethod: "none",
pkce: { method: "S256" },
});
expect(oauth?.scopes).toEqual(["user:read", "account:read", "offline_access"]);
expect(apiKey?.label).toContain("Bearer Token");
});
it("exposes all tools from the official code-mode MCP server", () => {
expect(provider.actions.map((action) => action.name)).toEqual(["docs", "search", "execute"]);
});
});