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:
samcxandClaude Opus 5.5 committed 2026-10-13 12:34:01 -06:00
1 parent bc9d27e631
commit 16a3cbae5d
1 file changed
+1 -1
+1 -1
View File
@@ -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);