Files
plex-playlist/frontend/vitest.config.ts

44 lines
1.0 KiB
TypeScript
Raw Normal View History

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,
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/**/*'],
setupFiles: ['./src/test-setup.ts'], // Automatically install Zod validation hooks
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: [
'node_modules/',
'dist/',
'**/*.config.*',
'**/*.d.ts',
'coverage/',
'tests/',
'playwright.config.ts',
],
thresholds: {
global: {
lines: 85,
functions: 85,
branches: 85,
statements: 85,
},
},
},
},
});