vitest.config.ts
Rama main · réplica de lectura del repositorio original.
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react-swc';
import path from 'path';
export default defineConfig({
plugins: [react()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/test/setup.ts'],
// Probe the live instance once before any suite runs, so live-DB tests can
// skip on "instance down" instead of failing with `fetch failed`.
globalSetup: ['./src/test/live-db-probe.ts'],
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
coverage: {
reporter: ['text', 'json', 'html'],
exclude: [
'node_modules/',
'src/test/',
'**/*.d.ts',
'src/integrations/',
],
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
});