import { defineConfig } from 'vitest/config' import vue from '@vitejs/plugin-vue' import { resolve } from 'path' /** * Vitest Configuration for TimeSafari * * Configures testing environment for Vue components with JSDOM support. * Enables testing of Vue-facing-decorator components with proper TypeScript support. * Excludes Playwright tests which use a different testing framework. * * @author Matthew Raymer */ export default defineConfig({ plugins: [vue()], test: { environment: 'jsdom', globals: true, setupFiles: ['./src/test/setup.ts'], include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], exclude: [ 'node_modules', 'dist', '.idea', '.git', '.cache', 'test-playwright/**/*', 'test-scripts/**/*', 'test-results/**/*', 'test-playwright-results/**/*' ], coverage: { provider: 'v8', reporter: ['text', 'json', 'html'], exclude: [ 'node_modules/', 'src/test/', '**/*.d.ts', '**/*.config.*', '**/coverage/**', 'test-playwright/**/*' ] } }, resolve: { alias: { '@': resolve(__dirname, './src') } } })