Skip to content

Add tests for adapter-claude and mcp-server packages #24

@skokaina

Description

@skokaina

Problem

packages/adapter-claude/ and packages/mcp-server/ are core features (code generation and IDE integration) with zero test files. Both have vitest configured in package.json but no actual tests.

An HN reviewer running find . -name '*.test.*' will notice immediately.

Scope

adapter-claude

  • loadSkill(framework) — test that it loads the correct .md file and prepends guidelines.md
  • listFrameworks() — test that it returns sorted array excluding guidelines.md
  • buildContext(manifest) — test that $file: refs are resolved and included
  • generateWithClaude() — mock the Anthropic API, verify prompt structure and file parsing

mcp-server

  • Tool registration — verify all MCP tools are registered
  • agentspec_health tool — mock sidecar, verify response shape
  • agentspec_gap tool — mock sidecar, verify response shape
  • Error handling — sidecar unreachable, invalid responses

Acceptance criteria

  • adapter-claude has >=5 unit tests covering core functions
  • mcp-server has >=5 unit tests covering tool registration and responses
  • Both packages pass pnpm test

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1-credibilityFix before or shortly after launchenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions