-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.ts
39 lines (38 loc) · 927 Bytes
/
vitest.config.ts
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
29
30
31
32
33
34
35
36
37
38
39
import react from '@vitejs/plugin-react';
import tsconfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
/// <reference types="vitest" />
export default defineConfig({
plugins: [tsconfigPaths(), react()],
define: {
'process.env': process.env,
},
test: {
setupFiles: './setupTests.ts',
include: ['src/**/*.test.?(c|m)[jt]s?(x)'],
css: true,
pool: 'vmThreads',
poolOptions: {
useAtomics: true,
},
browser: {
enabled: true,
headless: true,
provider: 'playwright',
instances: [{ browser: 'chromium' }],
},
testTimeout: 3000,
coverage: {
provider: 'v8',
include: ['src/**/*.{ts,tsx}'],
exclude: [
'node_modules/**',
'src/app/page.tsx',
'src/app/layout.tsx',
'src/**/*.{test,stories}.?(c|m)[jt]s?(x)',
'src/test',
],
enabled: true,
},
},
});