vitest.config.ts
758 bytes
| 1 | import { fileURLToPath } from 'node:url'; |
|---|---|
| 2 | import { defineConfig } from 'vitest/config'; |
| 3 | |
| 4 | export default defineConfig({ |
| 5 | test: { |
| 6 | environment: 'node', |
| 7 | globals: true, |
| 8 | include: ['src/**/*.test.ts'], |
| 9 | // Deterministic env so modules that read `env` (crypto, etc.) load cleanly. |
| 10 | env: { |
| 11 | DATABASE_URL: 'postgresql://localhost:5432/roundtable_test', |
| 12 | ENCRYPTION_KEY: '+s0sM+HW2k7YOW3uJxtmVM85xcJ18REhy4tEYF46ALM=', |
| 13 | MOCK_LLM: '1', |
| 14 | }, |
| 15 | coverage: { |
| 16 | provider: 'v8', |
| 17 | include: ['src/core/**/*.ts'], |
| 18 | exclude: ['src/core/**/*.test.ts', 'src/core/**/fixtures/**'], |
| 19 | reporter: ['text', 'html'], |
| 20 | }, |
| 21 | }, |
| 22 | resolve: { |
| 23 | alias: { |
| 24 | '@': fileURLToPath(new URL('./src', import.meta.url)), |
| 25 | }, |
| 26 | }, |
| 27 | }); |
| 28 | |