Files
box-box/docs/testing.md

955 B

Testing

Go

Targeted offline-ish packages:

go test ./internal/live ./internal/models ./internal/store ./internal/ingest ./internal/query ./internal/web

All packages:

go test ./...

OpenF1 integration tests require network access and are rate-limit aware:

go test -v ./internal/api

Frontend Unit Tests and Build

npm --prefix frontend test -- --run
npm --prefix frontend run build

E2E

The default Playwright config starts a seeded Go server on port 18080 and Vite on 15173.

npx playwright install   # first time only
npm run test:e2e

Production serving mode builds around Go serving frontend/dist:

npm run test:e2e:prod

Visual Regression

npm run test:visual
npm run test:visual:prod

After intentional UI changes:

npm run test:visual:update
npm run test:visual:prod:update

Snapshots live under tests/visual/__snapshots__/.