|
1 | 1 | import { describe, expect, it } from 'vitest'; |
2 | | -import { getMcpConfigArgs, getSkipPermissionsArgs } from './agents.js'; |
3 | | - |
4 | | -describe('getMcpConfigArgs', () => { |
5 | | - it('returns flag + path for claude', () => { |
6 | | - expect(getMcpConfigArgs('claude', '/tmp/config.json')).toEqual([ |
7 | | - '--mcp-config', |
8 | | - '/tmp/config.json', |
9 | | - ]); |
10 | | - }); |
11 | | - |
12 | | - it('returns flag + path for codex', () => { |
13 | | - expect(getMcpConfigArgs('codex', '/tmp/config.json')).toEqual(['--config', '/tmp/config.json']); |
14 | | - }); |
15 | | - |
16 | | - it('returns empty for gemini', () => { |
17 | | - expect(getMcpConfigArgs('gemini', '/tmp/config.json')).toEqual([]); |
18 | | - }); |
19 | | - |
20 | | - it('returns empty for opencode', () => { |
21 | | - expect(getMcpConfigArgs('opencode', '/tmp/config.json')).toEqual([]); |
22 | | - }); |
23 | | - |
24 | | - it('returns empty for copilot', () => { |
25 | | - expect(getMcpConfigArgs('copilot', '/tmp/config.json')).toEqual([]); |
26 | | - }); |
27 | | - |
28 | | - it('handles path-qualified claude command', () => { |
29 | | - expect(getMcpConfigArgs('/usr/local/bin/claude', '/tmp/config.json')).toEqual([ |
30 | | - '--mcp-config', |
31 | | - '/tmp/config.json', |
32 | | - ]); |
33 | | - }); |
34 | | - |
35 | | - it('handles unknown agent', () => { |
36 | | - expect(getMcpConfigArgs('unknown-agent', '/tmp/config.json')).toEqual([]); |
37 | | - }); |
38 | | -}); |
| 2 | +import { getSkipPermissionsArgs } from './agents.js'; |
39 | 3 |
|
40 | 4 | describe('getSkipPermissionsArgs', () => { |
41 | 5 | it('returns a copy of default skip-permission args', () => { |
|
0 commit comments