mirror of
https://github.com/acedanger/finance.git
synced 2025-12-05 22:50:12 -08:00
- Added React testing setup with JSDOM - Added component tests for AddTransactionForm and TransactionTable - Improved error handling and success messages in components - Updated test configuration and dependencies - Added CSS for error and success states
28 lines
746 B
TypeScript
28 lines
746 B
TypeScript
/// <reference types="vitest" />
|
|
import react from '@vitejs/plugin-react';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
// Ensure non-interactive and CI-friendly configuration
|
|
watch: false,
|
|
silent: false,
|
|
passWithNoTests: true,
|
|
teardownTimeout: 5000,
|
|
// Testing environment setup
|
|
environment: 'jsdom',
|
|
setupFiles: ['./src/test/setup.ts'],
|
|
// Test file patterns
|
|
include: ['src/test/**/*.{test,spec}.{ts,tsx}'],
|
|
// Coverage configuration
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html'],
|
|
exclude: ['node_modules/', 'src/test/**/*', '**/*.d.ts'],
|
|
},
|
|
// Global settings
|
|
globals: true,
|
|
},
|
|
});
|