vitest.config.ts 656 B

123456789101112131415161718192021222324252627282930
  1. import { defineConfig } from 'vitest/config'
  2. import vue from '@vitejs/plugin-vue'
  3. import path from 'path'
  4. export default defineConfig({
  5. plugins: [vue()],
  6. test: {
  7. globals: true,
  8. environment: 'jsdom',
  9. setupFiles: ['./tests/setup.ts'],
  10. include: ['tests/**/*.{test,spec}.{js,ts}'],
  11. coverage: {
  12. provider: 'v8',
  13. reporter: ['text', 'json', 'html'],
  14. exclude: [
  15. 'node_modules/**',
  16. 'tests/**',
  17. 'dist/**',
  18. '**/*.d.ts',
  19. 'vite.config.*'
  20. ]
  21. }
  22. },
  23. resolve: {
  24. alias: {
  25. '@': path.resolve(__dirname, 'src'),
  26. '#': path.resolve(__dirname, 'src/types')
  27. }
  28. }
  29. })