forked from paperswithcode/ai-deadlines
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathjest.config.js
More file actions
174 lines (161 loc) · 3.73 KB
/
jest.config.js
File metadata and controls
174 lines (161 loc) · 3.73 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
module.exports = {
testEnvironment: 'jsdom',
roots: ['<rootDir>/tests/frontend', '<rootDir>/static/js'],
// Setup files
setupFiles: [
'<rootDir>/tests/frontend/utils/globalSetup.js',
'jest-localstorage-mock'
],
setupFilesAfterEnv: [
'<rootDir>/tests/frontend/setup.js'
],
// Module mappings
moduleNameMapper: {
// Mock static assets
'\\.(css|less|scss|sass)$': '<rootDir>/tests/frontend/__mocks__/styleMock.js',
'\\.(jpg|jpeg|png|gif|svg)$': '<rootDir>/tests/frontend/__mocks__/fileMock.js',
// Map jQuery and other libraries
'^jquery$': '<rootDir>/static/js/jquery.min.js',
'^luxon$': '<rootDir>/static/js/luxon.js',
'^store$': '<rootDir>/static/js/store.min.js'
},
// Coverage configuration
collectCoverageFrom: [
'static/js/**/*.js',
'!static/js/**/*.min.js',
'!static/js/jquery*.js',
'!static/js/bootstrap*.js',
'!static/js/popper*.js',
'!static/js/lunr*.js',
'!static/js/store*.js',
'!static/js/luxon.js',
'!static/js/js-year-calendar*.js',
'!static/js/ouical*.js',
'!static/js/bootstrap-multiselect*.js',
'!static/js/jquery.countdown*.js'
],
coverageDirectory: '<rootDir>/coverage',
coverageThreshold: {
'./static/js/notifications.js': {
branches: 71,
functions: 85,
lines: 85,
statements: 82
},
'./static/js/countdown-simple.js': {
branches: 75,
functions: 80,
lines: 80,
statements: 80
},
'./static/js/search.js': {
branches: 70,
functions: 75,
lines: 75,
statements: 75
},
'./static/js/favorites.js': {
branches: 65,
functions: 60,
lines: 78,
statements: 78
},
'./static/js/dashboard.js': {
branches: 60,
functions: 70,
lines: 70,
statements: 70
},
'./static/js/conference-manager.js': {
branches: 50,
functions: 60,
lines: 60,
statements: 60
},
'./static/js/conference-filter.js': {
branches: 65,
functions: 70,
lines: 70,
statements: 70
},
'./static/js/theme-toggle.js': {
branches: 85,
functions: 100,
lines: 94,
statements: 94
},
'./static/js/timezone-utils.js': {
branches: 85,
functions: 100,
lines: 92,
statements: 92
},
'./static/js/series-manager.js': {
branches: 65,
functions: 70,
lines: 82,
statements: 80
},
'./static/js/lazy-load.js': {
branches: 48,
functions: 65,
lines: 72,
statements: 72
},
'./static/js/action-bar.js': {
branches: 38,
functions: 30,
lines: 40,
statements: 40
},
'./static/js/dashboard-filters.js': {
branches: 70,
functions: 85,
lines: 88,
statements: 86
},
'./static/js/about.js': {
branches: 80,
functions: 85,
lines: 95,
statements: 93
},
'./static/js/snek.js': {
branches: 100,
functions: 40,
lines: 84,
statements: 84
}
},
// Test patterns
testMatch: [
'**/tests/frontend/**/*.test.js',
'**/tests/frontend/**/*.spec.js'
],
// Global variables available in tests
globals: {
IS_TESTING: true,
JEKYLL_ENV: 'test'
},
// Ignore patterns
testPathIgnorePatterns: [
'/node_modules/',
'/_site/',
'/vendor/'
],
// Reporter configuration
reporters: [
'default'
// Uncomment if jest-html-reporter is installed:
// ['jest-html-reporter', {
// pageTitle: 'Python Deadlines Frontend Test Report',
// outputPath: './coverage/test-report.html'
// }]
],
// Timeout for tests
testTimeout: 10000,
// Clear mocks between tests
clearMocks: true,
restoreMocks: true,
resetMocks: true
};