-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
71 lines (58 loc) · 1.31 KB
/
jest.config.js
File metadata and controls
71 lines (58 loc) · 1.31 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
68
69
70
71
module.exports = {
// 테스트 환경
testEnvironment: 'node',
// 테스트 파일 패턴
testMatch: [
'**/__tests__/**/*.test.js'
],
// 커버리지 수집 설정
collectCoverage: true,
collectCoverageFrom: [
'src/**/*.js',
'!src/index.js', // 메인 엔트리 포인트 제외
'!src/deploy-commands.js' // 배포 스크립트 제외
],
// 커버리지 리포트 형식
coverageReporters: [
'text',
'lcov',
'html'
],
// 커버리지 출력 디렉토리
coverageDirectory: 'coverage',
// 커버리지 임계값 (임시로 낮춤)
coverageThreshold: {
global: {
branches: 10,
functions: 20,
lines: 20,
statements: 20
}
},
// 설정 파일들
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
// 모킹 설정
clearMocks: true,
resetMocks: true,
restoreMocks: true,
// 테스트 타임아웃 (밀리초)
testTimeout: 10000,
// 병렬 테스트 설정
maxWorkers: '50%',
// 변환 설정 (필요한 경우)
transform: {},
// 무시할 패턴
testPathIgnorePatterns: [
'/node_modules/',
'/data/',
'/coverage/'
],
// 모듈 경로 매핑
modulePathIgnorePatterns: [
'<rootDir>/data/'
],
// 전역 설정
globals: {
'process.env.NODE_ENV': 'test'
}
};