Skip to content

Phase 7: README test documentation #10

Description

@tinkermonkey

Add a Testing section to README.md that covers both test tracks, all prerequisite environment variables, graceful skip behavior, and how to run a single test file in isolation. This is the final phase — the documentation must accurately reflect the infrastructure built in prior phases.

Requirements

  • Add a ## Testing section to README.md covering:
    • Fast suite (npm test): offline, no credentials required, no live binaries needed
    • Live suite (npm run test:live): requires claude in PATH and either ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN set; for Copilot tests, requires copilot CLI installed and authenticated via gh auth login
    • Graceful skipping: when prerequisites are absent, suites skip rather than fail — explain this explicitly so contributors are not confused by 0 tests passed, 6 skipped output
    • Single test isolation: show exact command to run one test file without running the full suite, e.g., npx vitest run src/__tests__/live/claude.live.test.ts --config vitest.config.live.ts
  • Documentation must be accurate: environment variable names must match what claude.live.test.ts and copilot.live.test.ts actually check

Design Guidance

Implements the 'Documentation' phase (Phase 6, section 6.1) of the architecture design and FR-8 from the business requirements. The specific commands, environment variable names, and skip-behavior explanation are all derived from the architecture's documentation section.

Acceptance Criteria

  • README.md contains a Testing section with subsections for fast and live suites
  • npm test command is documented with a note that it requires no credentials
  • npm run test:live command is documented with exact environment variable names for both Claude and Copilot
  • Skip behavior is explicitly described (suites skip gracefully, not fail, when prerequisites are absent)
  • A single-test invocation command using --config vitest.config.live.ts is shown
  • All environment variable names in the README match the actual names checked in the live test files
  • Code is reviewed and approved

Dependencies

Phase 1, Phase 3, Phase 5, Phase 6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions