vitest.web.config.ts 1.1 KB

123456789101112131415161718192021222324252627
  1. import tsconfigPaths from 'vite-tsconfig-paths'
  2. import { defineConfig } from 'vitest/config'
  3. // Web smoke lane (GUI, gate-exempt — not part of the CI sequence yet): built
  4. // page + real chromium, so it lives outside the unit/e2e includes. The
  5. // real-host test self-skips without DEEPSEEK_API_KEY; the fixture test is
  6. // keyless and deterministic.
  7. try {
  8. // Node >= 21.7 native; throws when the file does not exist.
  9. process.loadEnvFile(new URL('.env', import.meta.url).pathname)
  10. } catch {
  11. // No .env — fine, the environment may already carry the variables.
  12. }
  13. export default defineConfig({
  14. // Same resolution note as vitest.config.ts: the tsconfig.base.json paths
  15. // facade has no include (match-all), so apps/web/tests resolves bare
  16. // workspace imports to source like every other lane.
  17. plugins: [tsconfigPaths({ projects: ['./tsconfig.base.json'] })],
  18. test: {
  19. include: ['apps/web/tests/**/*.e2e.ts'],
  20. // Browser boot + real-model turns are slow; files share one browser, run serial.
  21. testTimeout: 180_000,
  22. hookTimeout: 120_000,
  23. fileParallelism: false,
  24. },
  25. })