-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.mts
More file actions
67 lines (59 loc) · 1.81 KB
/
vitest.config.mts
File metadata and controls
67 lines (59 loc) · 1.81 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
62
63
64
65
66
67
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { defineConfig } from 'vitest/config';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@app': path.resolve(__dirname, './app'),
},
},
test: {
globals: true,
environment: 'happy-dom',
setupFiles: ['./src/shared/config/test/setup.ts'],
include: ['src/**/*.test.{ts,tsx}'],
css: false,
restoreMocks: true,
coverage: {
provider: 'v8',
reporter: ['html', 'lcov', 'text'],
include: ['src/**/*.{ts,tsx}'],
exclude: [
// 테스트 파일 자체, 배럴/타입 정의
'src/**/*.test.{ts,tsx}',
'src/**/index.ts',
'src/**/*.d.ts',
'src/**/*types*.ts',
// 설정·상수 (로직 없음)
'src/shared/config/**',
'src/shared/model/**',
'src/**/config/**',
// 서버 전용 (단위 테스트 불가, E2E 영역)
'src/shared/lib/auth/**',
// Provider·레이아웃 (통합/E2E 영역)
'src/app/**',
'src/views/**',
'src/widgets/**',
'src/**/model/*Provider*',
// 엔티티 (API 래퍼 + Zod 스키마 정의, 통합 테스트 영역)
'src/entities/**',
'src/shared/api/getQueryClient*',
// UI 컴포넌트 (E2E 영역 — 변경 시 개별 테스트 추가)
'src/shared/ui/spinner/**',
'src/shared/ui/back-button/**',
'src/features/**/ui/**',
// 커스텀 훅 (통합 테스트 영역)
'src/shared/lib/hooks/**',
'src/entities/**/model/use*',
],
thresholds: {
statements: 90,
branches: 90,
functions: 90,
lines: 90,
},
},
},
});