-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathvitest.config.js
More file actions
28 lines (27 loc) · 776 Bytes
/
Copy pathvitest.config.js
File metadata and controls
28 lines (27 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import path from 'path';
export default defineConfig({
plugins: [react()],
define: { global: 'globalThis' },
resolve: {
// .ts before .js to match Vite's resolve order
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
alias: {
buffer: 'buffer',
},
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./tests/setup.js'],
exclude: ['tests/e2e/**', 'node_modules/**'],
coverage: {
provider: 'v8',
reporter: ['text', 'lcov', 'html', 'json-summary'],
reportsDirectory: './coverage',
include: ['src/**/*.{js,jsx,ts,tsx}'],
exclude: ['src/main.jsx', 'src/i18n/**', 'src/styles/**'],
},
},
});