vitest.config.ts 492 B

123456789101112131415161718
  1. import tsconfigPaths from 'vite-tsconfig-paths';
  2. import { defineConfig } from 'vitest/config';
  3. export default defineConfig({
  4. plugins: [tsconfigPaths()],
  5. test: {
  6. environment: 'node',
  7. clearMocks: true,
  8. globals: true,
  9. environmentMatchGlobs: [
  10. // Use jsdom for client-side tests
  11. ['**/client/**/*.spec.ts', 'jsdom'],
  12. ['**/client/**/*.test.ts', 'jsdom'],
  13. ['**/client/**/*.spec.tsx', 'jsdom'],
  14. ['**/client/**/*.test.tsx', 'jsdom'],
  15. ],
  16. },
  17. });