2025-10-19 21:35:02 -04:00
|
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
|
import { fileURLToPath, URL } from 'node:url'
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [vue()],
|
|
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
|
|
|
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
test: {
|
|
|
|
|
environment: 'jsdom',
|
|
|
|
|
globals: true,
|
2025-10-30 12:25:45 -04:00
|
|
|
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}', 'tests/unit/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
|
|
|
exclude: ['tests/e2e/**/*'],
|
2025-10-23 12:58:32 -04:00
|
|
|
setupFiles: ['./src/test-setup.ts'], // Automatically install Zod validation hooks
|
2025-10-19 21:35:02 -04:00
|
|
|
coverage: {
|
|
|
|
|
provider: 'v8',
|
|
|
|
|
reporter: ['text', 'json', 'html'],
|
|
|
|
|
exclude: [
|
|
|
|
|
'node_modules/',
|
|
|
|
|
'dist/',
|
|
|
|
|
'**/*.config.*',
|
|
|
|
|
'**/*.d.ts',
|
|
|
|
|
'coverage/',
|
|
|
|
|
'tests/',
|
|
|
|
|
'playwright.config.ts'
|
2025-10-23 12:58:32 -04:00
|
|
|
],
|
|
|
|
|
thresholds: {
|
|
|
|
|
global: {
|
|
|
|
|
lines: 85,
|
|
|
|
|
functions: 85,
|
|
|
|
|
branches: 85,
|
|
|
|
|
statements: 85
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-10-19 21:35:02 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|