- 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>
18 lines
430 B
TypeScript
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/'],
|
|
},
|
|
},
|
|
});
|