-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.ts
29 lines (27 loc) · 891 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
/// <reference types="vitest" />
/// <reference types="vite/client" />
import react from '@vitejs/plugin-react';
import path from 'path';
import { defineConfig } from 'vite';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: './src/vitest_config/setup.ts',
// you might want to disable it, if you don't have tests that rely on CSS
// since parsing CSS is slow
css: true,
},
resolve: {
alias: {
'@utils': path.resolve(__dirname, 'src/utils'),
'@pages': path.resolve(__dirname, 'src/content'),
'@components': path.resolve(__dirname, 'src/components'),
'@context': path.resolve(__dirname, 'src/context'),
'@auth': path.resolve(__dirname, 'src/@types/auth.d.ts'),
'@services': path.resolve(__dirname, 'src/services'),
},
},
});