Testing & validation

Hover ships its tests in layers. Use them as a release gate.

Unit — Vitest, per package

pnpm test                              # fan out across the workspace
pnpm --filter @hover-dev/core test     # one package only

Tests live in packages/*/tests/. Keep src/ source-only — do not put *.test.ts inside src/.

Integration / end-to-end — Playwright dogfooding

Crystallized specs run as standard @playwright/test — no agent in the loop, only the saved script. That is the whole point of crystallization: CI runs plain Playwright with zero AI. Point a spec at any environment with BASE_URL.

Manual end-to-end (agent in the loop)

The full loop — agent drives the browser through the MCP and crystallizes a spec — is exercised by hand:

  1. Add the local MCP to your agent (or sideload the extension with pnpm --filter hover-dev package).
  2. Start any target dev server (a plain Vite / Next / etc. app; nothing Hover-related is installed in it).
  3. Run /mcp__hover__test_app and drive a real flow.

There is no scripted smoke loop; manual end-to-end is not part of CI.

Validation strategy

Before marking work ready:

  1. pnpm typecheck — fans out to every package.
  2. pnpm test — Vitest, fans out across packages with tests.
  3. pnpm build — confirms every package builds clean.
  4. The manual end-to-end (MCP run or extension sideload) that matches the files changed.

That sequence is also what the publish workflow gates a release on.