Testing & Quality
| Jenis | Detail |
|---|---|
| API unit | 2.834 tests (vitest) |
| Web unit | 645 tests (vitest) |
| Mobile | Typecheck bersih (Jest configured) |
| E2E journey | Env-gated (src/domain/journeys/e2e-full-sale.test.ts) — login → shift → sale → replay idempotency |
| Browser specs | Playwright (catalog drawer, workspace) |
| Load test | apps/api/scripts/load-test.mjs — smoke: 19.7 req/s, p95 1.9s, 0 error 5xx |
| OpenAPI parity | 124 stable ops × 218 runtime guards |
| Lint | Biome (API) + ESLint (web/mobile) — semua bersih |
Menjalankan test
Section titled “Menjalankan test”# API unit testsyarn workspace @treonstudio/klola-api test:unit
# API test spesifikyarn workspace @treonstudio/klola-api vitest run src/path/to/test.spec.ts
# Mobile testscd apps/mobile && yarn test path/to/test.spec.ts
# SDK testscd packages/klola-sdk && ../../node_modules/.bin/vitest run src/clientGerbang kualitas repo
Section titled “Gerbang kualitas repo”- Architecture boundaries:
dependency-cruiser+scripts/validate-source-ownership.mjs - Tenant index:
scripts/check-tenant-indexes.mjs - Foreign-key index:
scripts/check-foreign-key-indexes.mjs - Pre-commit hooks via Husky