Files
ocean_project_manager/frontend/vitest.config.js
T
2026-01-26 08:04:53 +08:00

40 lines
833 B
JavaScript

import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import path from 'path';
export default defineConfig({
plugins: [react()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./tests/setup.js',
css: true,
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: [
'node_modules/',
'tests/',
'**/*.config.js',
'**/*.config.jsx',
'**/dist/',
'**/build/',
'**/vite.config.js',
],
thresholds: {
lines: 80,
functions: 80,
branches: 75,
statements: 80,
},
},
include: ['src/**/*.{test,spec}.{js,jsx}'],
testTimeout: 10000,
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
});