()
| 74 | |
| 75 | describe('projectClaudeWorkspace', () => { |
| 76 | function buildScenario() { |
| 77 | const secrets = createSecrets({ MCP_TOKEN: 'super-secret' }) |
| 78 | const skills: Array<WorkspaceSkill> = [ |
| 79 | mcpSkill('issues', { |
| 80 | url: 'https://mcp.example.com/mcp', |
| 81 | headers: { Authorization: secrets.MCP_TOKEN }, |
| 82 | }), |
| 83 | agentSkill('public-skill'), |
| 84 | gitSkill({ repo: 'me/my-skill' }), |
| 85 | ] |
| 86 | const projection: WorkspaceProjection = { |
| 87 | skills, |
| 88 | plugins: ['@acme/plugin'], |
| 89 | resolveSecret: (ref) => { |
| 90 | if (ref.__secretName === 'MCP_TOKEN') return 'super-secret' |
| 91 | throw new Error(`unknown secret "${ref.__secretName}"`) |
| 92 | }, |
| 93 | markerPath: MARKER, |
| 94 | root: ROOT, |
| 95 | } |
| 96 | return { |
| 97 | projection, |
| 98 | gitDir: resolveGitSkillDir(ROOT, { kind: 'git', repo: 'me/my-skill' }), |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | it('writes .mcp.json with the secret resolved, links the gitSkill, installs the plugin, writes the marker', async () => { |
| 103 | const warn = vi.spyOn(console, 'warn').mockImplementation(() => {}) |
no test coverage detected