-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.ts
More file actions
40 lines (35 loc) · 1 KB
/
Copy pathvitest.config.ts
File metadata and controls
40 lines (35 loc) · 1 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
import { fileURLToPath, URL } from 'node:url'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vitest/config'
function resolvePath(path: string) {
return fileURLToPath(new URL(path, import.meta.url))
}
export default defineConfig({
root: resolvePath('./'),
plugins: [
react(),
],
resolve: {
alias: {
'@': resolvePath('./packages/app/src'),
'comps': resolvePath('./packages/comps/src'),
'config': resolvePath('./packages/config/src'),
'hooks': resolvePath('./packages/hooks/src'),
'i18n': resolvePath('./packages/i18n/src'),
'i18n/react': resolvePath('./packages/i18n/src/react'),
'styles': resolvePath('./packages/styles'),
'utils': resolvePath('./packages/utils/src'),
},
},
test: {
environment: 'jsdom',
setupFiles: ['./vitest.setup.ts'],
include: ['packages/**/*.{test,spec}.{ts,tsx}'],
exclude: [
'**/dist/**',
'**/node_modules/**',
],
restoreMocks: true,
clearMocks: true,
},
})