Testing
Run all commands from the repository root unless noted.What CI runs
Frontend (Vitest)
Node.js must be installed for the frontend tests.
Rust
The repo is a cargo workspace, so you can also target one member from the root:
ECHOPHRASE_CONFIG_DIR to a temp sandbox so they never read or write real user settings (see CONFIG_DIR_ENV in src-tauri/src/settings/mod.rs).
CLI crate
ECHOPHRASE_HOME), session round-trips, the ops layer and integration tests that drive the real binary through transcode, the MCP server and transcribe. The transcribe tests stand up a fake local HTTP server in place of the desktop app. Tests that mutate the environment are serialized because ECHOPHRASE_HOME is process-global. See CLI and MCP internals.
Code quality
Audio fixtures and the hands-free E2E test
tests/audio/ holds fixture WAVs (for example test-1-2.wav) and its own notes in tests/audio/CLAUDE.md.
On macOS you can verify the whole record -> transcribe -> paste pipeline with no human interaction, using the speakers as the audio source. See Audio pipeline.
Manual QA for the CLI transcribe path
The automated tests use a fake IPC server. To check the real path:
- Run
bun run tauri:dev, enable Settings > MCP Server, and wait for the model to load. - From
cli/, runcargo run -- transcribe ../tests/audio/test-1-2.wavand confirm a transcript prints. - Quit the app and run the same command again. It should print the friendly “desktop app must be running” error.