-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjest.config.js
More file actions
104 lines (94 loc) · 2.4 KB
/
jest.config.js
File metadata and controls
104 lines (94 loc) · 2.4 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
module.exports = {
// Test environment
testEnvironment: 'node',
// Test file patterns
testMatch: [
'**/tests/**/*.test.js',
'**/tests/**/*.spec.js',
'**/__tests__/**/*.js'
],
// Test organization
projects: [
{
displayName: 'unit',
testMatch: ['<rootDir>/tests/unit/**/*.test.js'],
setupFilesAfterEnv: ['<rootDir>/tests/setup.js']
},
{
displayName: 'integration',
testMatch: ['<rootDir>/tests/integration/**/*.test.js'],
setupFilesAfterEnv: ['<rootDir>/tests/setup.js']
},
{
displayName: 'api',
testMatch: ['<rootDir>/tests/api/**/*.test.js'],
setupFilesAfterEnv: ['<rootDir>/tests/setup.js']
},
{
displayName: 'performance',
testMatch: ['<rootDir>/tests/performance/**/*.test.js'],
setupFilesAfterEnv: ['<rootDir>/tests/setup.js']
},
{
displayName: 'validation',
testMatch: ['<rootDir>/tests/validation/**/*.test.js'],
setupFilesAfterEnv: ['<rootDir>/tests/setup.js']
},
{
displayName: 'backward-compatibility',
testMatch: ['<rootDir>/tests/backward-compatibility/**/*.test.js'],
setupFilesAfterEnv: ['<rootDir>/tests/setup.js']
},
{
displayName: 'translations',
testMatch: ['<rootDir>/tests/translations/**/*.test.js'],
setupFilesAfterEnv: ['<rootDir>/tests/setup.js']
},
{
displayName: 'guidelines',
testMatch: ['<rootDir>/tests/guidelines/**/*.test.js'],
setupFilesAfterEnv: ['<rootDir>/tests/setup.js']
},
{
displayName: 'specific-tests',
testMatch: ['<rootDir>/tests/specific/**/*.test.js'],
setupFilesAfterEnv: ['<rootDir>/tests/setup.js']
}
],
// Coverage configuration
collectCoverageFrom: [
'src/conversions/**/*.js',
'src/**/*.js',
'!**/node_modules/**',
'!**/tests/**',
'!src/index.js'
],
// Coverage reporters
coverageReporters: [
'text',
'lcov',
'json-summary',
'clover'
],
// Coverage thresholds
coverageThreshold: {
global: {
branches: 60,
functions: 70,
lines: 65,
statements: 70
}
},
// Setup files
setupFilesAfterEnv: ['<rootDir>/tests/setup.js'],
// Module name mapping for better imports
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1'
},
// Verbose output
verbose: true,
// Clear mocks between tests
clearMocks: true,
// Test timeout
testTimeout: 10000
};