Testing & Quality Assurance
How Job-Easy enforces correctness through static boundaries and schema-bound integration harnesses.
The platform ensures correctness through a strict combination of static analysis (TypeScript + ESLint), extremely fast unit tests, and database-backed workflows that protect critical architectural invariants.
The Testing Pyramid
Static Analysis
TypeScript strict mode and ESLint boundary rules instantly catch architecture violations.
Unit Tests
Pure logic testing (mappers, schemas, parsers) using the Node.js native test runner.
Integration Harnesses
Database-backed workflows guaranteeing invariants like GDPR deletion and queue claiming.
Unit Testing (node:test)
We use the native Node.js test runner (node:test) instead of Jest or Vitest. This results in zero configuration, instant execution, and no dependency overhead. Tests are strictly colocated in __tests__ directories within each feature slice.
No Database in Unit Tests
/tests/integration directory at the root, ensuring the unit test suite remains blisteringly fast.Schema-Bound Integration Testing
Integration tests run against a real, isolated PostgreSQL database container. They don't just test basic CRUD operations; they enforce the system's hardest architectural invariants against future regression.
- GDPR Deletion Exhaustiveness: A test actively reflects on the Prisma schema metadata. If a developer adds a new table with a relation to
Userbut forgets to add it to theaccountDeletion.workflow.tscascade transaction, the test suite instantly fails. - Cron Job Drift: A test enforces that the internal
constants/jobs.tsregistry perfectly mirrors the deploymentvercel.jsonfile, guaranteeing that a new cron job is never deployed without a backing handler, or vice-versa. - Mail Queue Concurrency: Tests simulate concurrent cron invocations to guarantee that the
FOR UPDATE SKIP LOCKEDqueue mechanism never double-sends a transactional email.
ESLint Boundary Enforcement
The 5-tier architecture is actively enforced by eslint-plugin-import zone rules. For example, if a developer in src/components (Tier 3) attempts to import directly from a database repository in src/features (Tier 1), the build fails. This prevents the codebase from deteriorating into a big ball of mud.