Testing
Before every pull request
bun run ciThis runs the dependency audit, formatting and lint checks, type checks and unit tests. It also runs the Android offline queue tests, which need the Android SDK; without it they're skipped locally with a warning, but CI runs them.
Integration tests
bun run ci skips integration tests. They need PostgreSQL and Redis at the addresses in .env.ci, and use a separate openbeacon_test database so they never touch your development data.
docker compose up -d db redis
bun run test:integration:migrate
bun run test:integrationTo run only some, pass their folders, such as bun run test:integration packages/cache.
Different Android versions
If a change touches location, permissions, notifications, background work or native code, try it on the oldest and newest supported versions:
bun run emulators:versions 24 36To reproduce a bug someone reported, run their version on its own, such as bun run emulators:versions 31. See Android emulators for the options and the compatibility matrix.
What to test
Test logic, not buttons. Anything touching encryption, keys or what the server can see needs careful tests, so a later change can't quietly break it. Tests for the recovery phrase, for example, capture every API request and check that no secret key or phrase is ever sent.