Roo-Code/vitest.config.mts
2025-05-11 21:15:57 -07:00

22 lines
713 B
TypeScript

import react from '@vitejs/plugin-react';
// import { loadEnv } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [react(), tsconfigPaths()],
test: {
globals: true, // This is needed by @testing-library to be cleaned up after each test
include: ['src/**/*.test.{js,jsx,ts,tsx}'],
coverage: {
include: ['src/**/*'],
exclude: ['src/**/*.stories.{js,jsx,ts,tsx}', '**/*.d.ts'],
},
environmentMatchGlobs: [
['**/*.test.tsx', 'jsdom'],
['src/hooks/**/*.test.ts', 'jsdom'],
],
setupFiles: ['./vitest-setup.ts'],
// env: loadEnv('', process.cwd(), ''),
},
});