fix(test): add env defaults to platform-service vitest config
Aligns service-local vitest.config.ts with root config so tests pass both via 'pnpm test' (uses service config) and 'npx vitest run' (uses root). Fixes telemetry.test.ts which fails because its import chain eagerly loads config.ts → envSchema.parse() requiring COSMOS_ENDPOINT/KEY/JWT_SECRET. Added: RATE_LIMIT_STORE_MODE=memory, COSMOS_ENDPOINT, COSMOS_KEY, JWT_SECRET (all test-safe placeholders, never used at runtime with DB_PROVIDER=memory)
This commit is contained in:
parent
7613d6890f
commit
2c6397272f
@ -8,6 +8,10 @@ export default defineConfig({
|
|||||||
pool: 'threads',
|
pool: 'threads',
|
||||||
env: {
|
env: {
|
||||||
DB_PROVIDER: 'memory',
|
DB_PROVIDER: 'memory',
|
||||||
|
RATE_LIMIT_STORE_MODE: 'memory',
|
||||||
|
COSMOS_ENDPOINT: 'https://test.documents.azure.com:443/',
|
||||||
|
COSMOS_KEY: 'dGVzdC1rZXktZm9yLXZpdGVzdC1vbmx5',
|
||||||
|
JWT_SECRET: 'vitest-only-not-for-production',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user