Skip to main content

Running tests

API tests use Jest with config test/jest.json. AGENTS.md places feature specs under test/modules/.

cd pnxt-api-nestjs
yarn test
yarn test:cov
yarn test:debug
yarn verify
yarn architecture:check
yarn verify:test-pairs
ScriptWhat it runs
yarn testJest --passWithNoTests --forceExit
yarn test:covJest with coverage
yarn test:debugJest under --inspect-brk, --runInBand
yarn verifylint, Prettier check, typecheck, nest build, test
yarn architecture:checkModule boundary ratchet (scripts/architecture/check.mjs)
yarn verify:test-pairsFails when a feature has no paired test

pretest generates the Prisma client. Pre-commit uses lint-staged (Prettier and ESLint) via Husky.

Admin uses Vitest (pnpm verify in pnxt-admin). The warehouse package.json that was read has no test script.

CI workflows exist at pnxt-api-nestjs/.github/workflows/test.yml and deploy.yml. Read those files for the current steps. This page does not restate them, because they drift.

What the architecture check is for​

It guards the rules in Conventions: feature modules must not import area modules, cycles, and concrete integration imports. A new Prisma model that is missing from the tenancy extension fails test/architecture/backend-architecture.spec.ts (stated in docs/AI_CONTEXT.md).