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