Developer testing
API (Go)
Section titled “API (Go)”Run unit tests for all internal packages:
go test ./internal/... -v -timeout 5m -coverprofile=cover.outTests use database mocking and assertion libraries. Each package follows table-driven test patterns.
Integration tests
Section titled “Integration tests”Integration tests require a real PostgreSQL and Redis instance (provided by Docker in local dev). Run them with the integration build tag:
go test -tags=integration ./internal/... -v -timeout 5mCLI (Go)
Section titled “CLI (Go)”go test ./... -v -timeout 5m -count=1Integration tests use the same build tag:
go test -tags=integration ./... -v -timeout 5mDashboard
Section titled “Dashboard”Unit tests
Section titled “Unit tests”The dashboard uses Vitest with jsdom for unit and component tests:
# Watch modepnpm test
# Coverage report (lcov)pnpm test:coverageEnd-to-end tests
Section titled “End-to-end tests”E2E tests use Playwright with Chromium. They require the API server to be running and a preview build of the dashboard:
pnpm test:e2e