Files
maestro/test/jest.setup-env.ts
T
RafaelandWOZCODE a795f543f6 feat(auth): GET /auth/module-identity — identity + module gate
Adds the route (cookie auth via verifyAccessToken, module gate seqid 31,
X-Auth-* headers, admin via seqid set). Adds a jest setupFiles hook giving a
dummy DUC_URL for module-load-time env reads, which also unblocks the
pre-existing authentication.guard.spec.

Co-Authored-By: WOZCODE <contact@withwoz.com>
2026-08-20 10:09:31 -03:00

14 lines
622 B
TypeScript

/**
* Jest setupFiles hook: provide dummy values for env vars that modules read
* at *import time* (module-load side effects), so unit specs that transitively
* import those modules don't crash before a single test runs.
*
* These are never exercised by unit tests — the services that use them are
* stubbed via DI — but the values must exist because the reads happen at
* module evaluation, before any mock is installed.
*
* DUC_URL: read at load time in src/modules/duc/client.config.ts, reached via
* the AuthClientService import chain.
*/
process.env.DUC_URL = process.env.DUC_URL || 'duc:localhost:0';