Run from the repository root.
Day to day
Checks
Infrastructure
Deployment
These run on the VPS from the production checkout (see
deployment); the GitHub workflow drives the first two.
Per package
Each package is a workspace, so its own scripts work too:
How the tests are run
The API compiles to CommonJS, so its tests run on Jest. TypeScript 7 is a native
compiler and does not expose the JavaScript compiler API that ts-jest needs, so
babel.config.cjs transforms test files and pnpm typecheck does the type
checking — the two responsibilities are separate, and types are checked over test
files too because tsconfig.json includes src/**/*.ts.
Contracts are ESM and use the built-in test runner instead:
It imports from dist/, so build first — pnpm build or
pnpm --filter @dme/contracts build.
What Jest cannot reach
@nestjs/common is ESM-only, and Jest loads it as CommonJS, so a test file that
imports Nest cannot run. Anything that needs a DI container therefore lives
outside Jest: the decision logic is split into a framework-free module that is
unit tested, and the wiring around it is checked by booting a real app instead.
verify:idempotency is that check for the idempotency interceptor — it mounts the
interceptor, decorator, guard and error filter on a throwaway app, then asserts
replay, conflict, per-caller scoping, and that a failure is left retryable.
What CI should run
Then assert that pnpm openapi:write leaves no diff: a specification that changed
without being committed is an unreviewed contract change. CI builds both Docker
images too, so a lockfile drift or a Dockerfile mistake fails before it reaches
the VPS. Last modified on October 6, 2026