Skip to content

Testing strategy

Changes should pass typecheck, the Vitest suite, and a production build — plus a real Electron smoke test for anything mocks can't prove.

The baseline

bash
npm run typecheck
npm test
npm run build

All three are required before opening or updating a pull request, and all three run in CI (.github/workflows/release.yml's validation job, and the docs site's own CI for documentation changes).

Where unit tests stop being enough

Warning

Unit mocks cannot prove native module spawn behavior, real PATH resolution, actual provider CLI interaction, or packaged-app behavior. Treat a green Vitest run as necessary, not sufficient, for changes in these areas.

For changes touching agent execution, IPC, persisted AIgency workflow state, packaging, or destructive filesystem/git actions, use the relevant real-Electron smoke script instead of trusting mocks alone — for example npm run test:pty for PTY behavior, or npm run test:e2e:antigravity for an end-to-end Antigravity smoke check.