mirror of
https://github.com/vercel-labs/fx.git
synced 2026-10-28 10:15:17 +08:00
Compare MCP-v2 Slack scopes as a set in the sign-in test
fx.sh checks only that the scope set matches, so the test sorts both sides instead of depending on the order fx sends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 file changed
+1
-1
@@ -4448,7 +4448,7 @@ describe("MCP-v2 login (FX_MCP_ENGINE=v2)", () => {
|
||||
expect(start.searchParams.get("state")).toMatch(/^[A-Za-z0-9_-]{43}$/);
|
||||
expect(start.searchParams.get("challenge")).toMatch(/^[A-Za-z0-9_-]{43}$/);
|
||||
expect(start.searchParams.get("client_id")).toBe(FX_SLACK_CLIENT_ID);
|
||||
expect(start.searchParams.get("scope")!.split(" ")).toEqual([...FX_SLACK_SCOPES, "groups:history", "im:history", "mpim:history"].sort());
|
||||
expect(start.searchParams.get("scope")!.split(" ").sort()).toEqual([...FX_SLACK_SCOPES, "groups:history", "im:history", "mpim:history"].sort());
|
||||
// fx.sh's page posts what Slack sent back; only its origin is taken.
|
||||
const target = `http://127.0.0.1:${start.searchParams.get("port")}/slack/oauth/callback`;
|
||||
const body = await authorizePersonalFixture(auth, start);
|
||||
|
||||
Reference in new issue
Block a user