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:
saravanakumardb1 2026-03-21 15:32:14 -07:00
parent 7613d6890f
commit 2c6397272f

View File

@ -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',
}, },
}, },
}); });