mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-08 06:49:08 +00:00
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>
14 lines
622 B
TypeScript
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';
|