Development
Testing
Unit tests, E2E tests, and CI for Parchment.
Unit Tests (Vitest)
From web/:
bun run test # Run once
bun run test:ui # UI mode
bun run test --watch # Watch modeTests live in web/src/**/*.{test,spec}.ts. The web build runs unit tests before building (vitest run). Pre-commit (Husky + lint-staged) runs only the web unit suite; e2e is not run on commit.
E2E Tests (Playwright)
Requires Docker.
- Copy
web/e2e/env.test.exampletoweb/e2e/env.test(or.env.testin repo root). - Set
APP_TESTER_EMAILand optionallyE2E_MAPBOX_ACCESS_TOKENfor map tests.
From web/:
bun run test:e2e # Start test stack and run tests
bun run test:e2e:ui # Interactive UITest user receives OTP 0000-0000. E2E runs in CI only (not on pre-commit).
CI
The pipeline runs web unit tests and then e2e tests on every push and pull request to main and dev. To block merging to dev until tests pass: Settings → Rules → Rulesets → New ruleset → target dev → add Require status checks → add status check e2e → Save.