Open History to see the last commit
1// @effect-diagnostics nodeBuiltinImport:off - cleanup uses Node's retrying rm, which the FileSystem service does not expose.
2import { vi } from "vite-plus/test";
3import { assert, it } from "@effect/vitest";
4
5import { buildClaudeCapabilitiesProbeQueryOptions } from "./ClaudeProvider.ts";
6
7vi.mock("@anthropic-ai/claude-agent-sdk", { spy: true });
8
9it("drops strict MCP mode, and only that, next to an administrator's managed-mcp.json", () => {
10 const options = buildClaudeCapabilitiesProbeQueryOptions({
11 executablePath: "/usr/bin/claude",
12 abortController: new AbortController(),
13 environment: { HOME: "/home/user" },
14 cwd: undefined,
15 managedMcpConfig: true,
16 });
17
18 // Claude exits before initializing when handed --strict-mcp-config here.
19 assert.equal(options.strictMcpConfig, undefined);
20 assert.deepEqual(options.mcpServers, {});
21 assert.equal(options.env?.ENABLE_CLAUDEAI_MCP_SERVERS, "false");
22});