-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
61 lines (60 loc) · 1.4 KB
/
vitest.config.ts
File metadata and controls
61 lines (60 loc) · 1.4 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import react from '@vitejs/plugin-react';
import path from 'path';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'~': path.resolve(import.meta.dirname, 'src'),
},
},
test: {
root: import.meta.dirname,
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
reportsDirectory: path.resolve(import.meta.dirname, 'coverage'),
include: [
'src/**/*.{js,ts,tsx}',
'convex/**/*.{js,ts}',
],
exclude: [
'src/**/*.{test,spec}.{js,ts,tsx}',
'convex/**/*.{test,spec}.{js,ts}',
'convex/_generated/**',
'convex/_fixtures/**',
],
},
projects: [
{
extends: true,
test: {
include: ['src/**/*.{test,spec}.{js,ts,tsx}'],
name: 'react',
environment: 'jsdom',
},
},
{
extends: true,
test: {
include: ['convex/**/*.{test,spec}.{js,ts}'],
name: 'convex',
environment: 'edge-runtime',
server: {
deps: {
inline: ['convex-test'],
external: ['**/node_modules/**'],
},
},
deps: {
optimizer: {
ssr: {
exclude: ['**/node_modules/**'],
},
},
},
},
},
],
},
});