-
Notifications
You must be signed in to change notification settings - Fork 6
/
vitest.config.ts
35 lines (33 loc) · 1.72 KB
/
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
import path from 'path';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vitest/config';
export default defineConfig({
resolve: {
alias: [
{ find: '@', replacement: path.resolve(__dirname, './src') },
{ find: '@app', replacement: path.resolve(__dirname, './src/app') },
{ find: '@components', replacement: path.resolve(__dirname, './src/components') },
{ find: '@shared', replacement: path.resolve(__dirname, './src/components/shared') },
{ find: '@styles', replacement: path.resolve(__dirname, './src/styles') },
{ find: '@remote', replacement: path.resolve(__dirname, './src/remote') },
{ find: '@constants', replacement: path.resolve(__dirname, './src/constants') },
{ find: '@contexts', replacement: path.resolve(__dirname, './src/contexts') },
{ find: '@model', replacement: path.resolve(__dirname, './src/model') },
{ find: '@utils', replacement: path.resolve(__dirname, './src/utils') },
{ find: '@stores', replacement: path.resolve(__dirname, './src/stores') },
{ find: '@lib', replacement: path.resolve(__dirname, './src/lib') },
{ find: '@hooks', replacement: path.resolve(__dirname, './src/hooks') },
{ find: '@providers', replacement: path.resolve(__dirname, './src/providers') },
{ find: '@stories', replacement: path.resolve(__dirname, './src/stories') },
{ find: '@tests', replacement: path.resolve(__dirname, './src/tests') },
{ find: '@mocks', replacement: path.resolve(__dirname, './src/mocks') },
{ find: '@types', replacement: path.resolve(__dirname, './src/types') },
],
},
plugins: [react()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: './vitest.setup.ts',
},
});