Ticket: AUTH-T93 · Epic: E13 Testing & QA · Phase: Phase 0 — Foundation
Priority: High · Estimate: 3 points · Labels: epic:testing, phase:0, testing, infra
Depends on:
Configure vitest (node environment) with a global setup that points Prisma at the Neon test branch (reset from dev before each CI run; runs serialized by a GitHub Actions concurrency group because the 10-branch cap rules out per-run branches), applies migrations, and truncates tables between test files. Provide factories (createUser, createAdmin, createPrimaryAdmin, createSession, createPosition), a fake clock helper, a capturing mailer, and a fake Upstash (in-memory) limiter. Add npm test and coverage thresholds (80% lines on src/lib).
Acceptance criteria
Generated from the SGAuth design (docs/sgauth-design in SGAOperations/auth). SGAuth is built on Neon and does not use Supabase.
Ticket: AUTH-T93 · Epic: E13 Testing & QA · Phase: Phase 0 — Foundation
Priority: High · Estimate: 3 points · Labels: epic:testing, phase:0, testing, infra
Depends on:
Configure vitest (node environment) with a global setup that points Prisma at the Neon
testbranch (reset fromdevbefore each CI run; runs serialized by a GitHub Actions concurrency group because the 10-branch cap rules out per-run branches), applies migrations, and truncates tables between test files. Provide factories (createUser,createAdmin,createPrimaryAdmin,createSession,createPosition), a fake clock helper, a capturing mailer, and a fake Upstash (in-memory) limiter. Addnpm testand coverage thresholds (80% lines onsrc/lib).Acceptance criteria
npm testruns locally against a personal branch and in CI against the test branch in under 5 minutes.Generated from the SGAuth design (docs/sgauth-design in SGAOperations/auth). SGAuth is built on Neon and does not use Supabase.