26 lines
731 B
TypeScript
26 lines
731 B
TypeScript
// Copyright (c) 2025 Patrick Motsch
|
|
// All rights reserved.
|
|
//
|
|
// Vitest config for frontend unit + component tests.
|
|
// Lives next to vite.config.ts; reuses the @vitejs/plugin-react setup.
|
|
|
|
import { defineConfig } from 'vitest/config';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
setupFiles: ['./src/test/setup.ts'],
|
|
css: true,
|
|
include: ['src/**/*.test.{ts,tsx}'],
|
|
exclude: ['node_modules', 'dist', '.git'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'html'],
|
|
include: ['src/**/*.{ts,tsx}'],
|
|
exclude: ['src/**/*.test.{ts,tsx}', 'src/test/**', 'src/main.tsx'],
|
|
},
|
|
},
|
|
});
|