-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjest.config.js
More file actions
46 lines (37 loc) 路 848 Bytes
/
Copy pathjest.config.js
File metadata and controls
46 lines (37 loc) 路 848 Bytes
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
export default {
// Test environment
testEnvironment: 'node',
// Test file patterns
testMatch: [
'**/__test__/**/*.test.js'
],
// Coverage settings
collectCoverage: true,
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
collectCoverageFrom: [
'src/**/*.js',
'!src/**/*.test.js',
'!**/node_modules/**'
],
// Module resolution - correct property name
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1'
},
// Transform settings for ESM - disable transforms for pure ESM
transform: {},
// Setup files
setupFilesAfterEnv: ['<rootDir>/__test__/setup.js'],
// Verbose output
verbose: true,
// Clear mocks between tests
clearMocks: true,
// Error handling
errorOnDeprecated: true,
// ESM support
globals: {
jest: {
useESM: true
}
}
}