| Variable | Default | Purpose |
|---|---|---|
ROOMY_HOME |
$HOME |
Where the test fixture writes per-run sqlite + workspace dirs (under a mkdtemp subdir, not the user's real ~/Roomy) |
| Docker daemon | auto-detected | Sandbox integration tests run when docker info succeeds. Rootful and rootless Linux + macOS Docker Desktop all work |
at / crontab |
auto-detected | Scheduler integration tests run when the commands are available |
Real AI tests use the anthropic/claude-haiku-4-5 model and require no API key.
# Vitest unit + integration suite (host)
npm run test:host
# Playwright e2e (spawns roomy-server + Vite preview)
npm run test:e2e
# Chaos / load test against a live roomy-server (see CHAOS_TESTING.md)
node scripts/chaos-test.mjsGitHub Actions runs the independent gates in parallel:
Typecheckrunsnpm run typecheck.Vitest (host suite)builds the sandbox CLI androomy/sandbox:v1, then runs the host Vitest suite.Playwright e2ebuilds@roomy-ai/apiand its Nx dependencies, installs Chromium, then runs the UI e2e suite with the fake sandbox driver.
The final Test (host suite) job is an aggregate compatibility check that fails unless all three parallel jobs pass.
Pure logic, no external dependencies. Examples: error mapping, OpenAPI spec generation, WS registry, mount path calculation.
Hit real backends (SQLite, Docker, at/crontab). Each test gets an
isolated mkdtemp ROOMY_HOME and SQLite file. Auto-detected — skipped
when the backend is unavailable, not gated by opt-in env vars.
Full server stack: HTTP server against real SQLite, real auth, real
WebSocket upgrade, real run lifecycle. The API e2e.test.ts exercises
login, CRUD, message sending, run triggering, and WebSocket event
delivery. The Playwright suite drives the UI through Vite's preview
proxy at :5179.
The runtime execRun.test.ts and the API e2e.test.ts real-stack
block exercise a real AI invocation inside a real Docker container
against the anthropic/claude-haiku-4-5 model — no API key required.
They auto-skip when the sandbox image isn't available locally.
Each test creates a fresh ROOMY_HOME under $TMPDIR and an SQLite file
inside it. Migrations run on first connection — no admin database, no
manual schema setup. Tests that need a sandbox container reuse the
host's roomy/sandbox:v1 image; build it once with the command in
README.md.
Follow the existing pattern:
mkdtempaROOMY_HOMEper test.- Set
ROOMY_DB_PATHunder it; migrations run automatically. - For Docker/scheduler tests, auto-detect availability instead of gating on opt-in env vars.
- Tear down in
afterAll.