erp-construccion-frontend-v2/web/vitest.config.ts
Adrian Flores Cortes 434990972e test: Add Vitest and tests for Toast system
- Configure Vitest with jsdom environment
- Add test setup with @testing-library/jest-dom
- Add 6 tests for toastStore (addToast, removeToast, clearToasts)
- Add 8 tests for useToast hook (success, error, warning, info, dismiss)

All 14 tests passing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 01:17:52 -06:00

18 lines
430 B
TypeScript

/// <reference types="vitest" />
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/test/setup.ts'],
include: ['src/**/*.{test,spec}.{ts,tsx}'],
coverage: {
reporter: ['text', 'json', 'html'],
exclude: ['node_modules/', 'src/test/'],
},
},
});