# everything (via turbo)
pnpm test
# a single package
pnpm --filter @chordially/api test
pnpm --filter @chordially/web test
pnpm --filter @chordially/mobile test
pnpm --filter @chordially/shared test- Runner: vitest + supertest, against the Express app (no real HTTP server is started).
- Database: tests run against a dedicated SQLite database configured via
apps/api/.env.test. Thetestscript runsprisma db pushagainst that database before running vitest, and a globalbeforeEachhook (tests/setup.ts) clears theUsertable between tests. - Coverage: registration (success, duplicate email, invalid input), login
(success, invalid credentials, unknown account), and the
requireAuthmiddleware (valid token, missing token, invalid token). - Test files run sequentially (
fileParallelism: false) to avoid SQLite lock contention.
- Runner: vitest + @testing-library/react + jsdom.
- Tests render the
/loginand/registerpages insideAuthProvider, mockinglib/auth-clientso no real network calls are made, and assert that the expected fields render and that client-side validation errors (from the shared zod schemas) are shown.
- Runner: Jest with the
jest-expopreset and@testing-library/react-native. - Currently contains a single smoke test that renders
Appand asserts it mounts without crashing.
- Runner: vitest.
- Tests cover the
registerSchemaandloginSchemavalidation rules (valid/invalid emails, password complexity, required fields).
Each package has its own GitHub Actions workflow under
.github/workflows/ that installs dependencies and runs the relevant
turbo run tasks (lint, test, and build where applicable) scoped to
that package with --filter. A pull request only needs to pass the
workflows for the packages it touches (plus any packages that depend on
them, via turbo's dependency graph).