Skip to content

Testing

Yash Aryan edited this page Aug 8, 2026 · 1 revision

Testing

Runner

cd app
bun test
bun run typecheck
  • Config: app/bunfig.toml
  • Preload mock: app/test/electron-mock.ts so modules importing electron work under Bun

What exists

Dozens of *.test.ts files focused on:

  • Agents (plan parse, workers rounds, mutex, load clamp)
  • Tools / skills / web research recovery
  • Documents generation / thin PDF rejection
  • Project-coding helpers
  • Load guard
  • Renderer helpers (setup wizard, skill chips, …)
  • Various pure utilities

There is little full Electron e2e. UI streaming and confirm dialogs need manual checks.

Writing tests

  1. Prefer pure functions extracted from fat modules (ipc.ts is large — test callees).
  2. Mock fetch / filesystem at boundaries.
  3. For tool rounds, assert caps (MAX_TOOL_ROUNDS, confirm deny).
  4. Don’t require network in unit tests; mock Ollama/Chroma.

Firestore rules

Not fully proven by automated suite historically. For rules changes:

  1. Emulator rules tests if present / add them
  2. Manual scenario matrix (member vs admin vs outsider)
  3. Careful first production deploy

CI expectation

Release/build workflows compile and package; run typecheck + test locally before PR. Match whatever .github/workflows enforces on your branch.

Clone this wiki locally